blob: abb1190ebc38e66d6b70222bc6c7f764385faee4 (
plain)
1
2
3
4
5
6
7
|
const fn add(x: usize, y: usize) -> i32 {
add + y
// { dg-error "cannot apply operator .+. to types fn .x usize,y usize,. -> i32 and usize" "" { target *-*-* } .-1 }
}
const ARR: [i32; add(1, 2)] = [5, 6, 1];
// { dg-error "mismatched types, expected .usize. but got .i32. .E0308." "" { target *-*-* } .-1 }
// { dg-error "mismatched types" "" { target *-*-* } .-2 }
|