Skip to content

Commit 6fbb60c

Browse files
committed
tail-typeck
1 parent 04afd01 commit 6fbb60c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
fn f() -> isize { return g(); } //~ ERROR mismatched types
1+
//! This test verifies that the type checker correctly identifies and reports error
22
3-
fn g() -> usize { return 0; }
3+
fn f() -> isize {
4+
return g();
5+
} //~ ERROR mismatched types [E0308]
46

5-
fn main() { let y = f(); }
7+
fn g() -> usize {
8+
return 0;
9+
}
10+
11+
fn main() {
12+
let y = f();
13+
}

0 commit comments

Comments
 (0)