1
Fork 0

Move /src/test to /tests

This commit is contained in:
Albert Larsan 2023-01-05 09:13:28 +01:00
parent ca855e6e42
commit cf2dff2b1e
No known key found for this signature in database
GPG key ID: 92709B88BB8F13EA
27592 changed files with 0 additions and 0 deletions

25
tests/ui/nested-class.rs Normal file
View file

@ -0,0 +1,25 @@
// run-pass
#![allow(non_camel_case_types)]
pub fn main() {
struct b {
i: isize,
}
impl b {
fn do_stuff(&self) -> isize { return 37; }
}
fn b(i:isize) -> b {
b {
i: i
}
}
// fn b(x:isize) -> isize { panic!(); }
let z = b(42);
assert_eq!(z.i, 42);
assert_eq!(z.do_stuff(), 37);
}