move passing stage1 compile error tests to stage2
This commit is contained in:
committed by
Jakub Konka
parent
c248af3bdc
commit
3204d00a5e
@@ -0,0 +1,23 @@
|
||||
const Number = enum {
|
||||
One,
|
||||
Two,
|
||||
Three,
|
||||
Four,
|
||||
};
|
||||
fn f(n: Number) i32 {
|
||||
switch (n) {
|
||||
Number.One => 1,
|
||||
Number.Two => 2,
|
||||
Number.Three => @as(i32, 3),
|
||||
}
|
||||
}
|
||||
|
||||
export fn entry() usize { return @sizeOf(@TypeOf(&f)); }
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :8:5: error: switch must handle all possibilities
|
||||
// :8:5: note: unhandled enumeration value: 'Four'
|
||||
// :1:16: note: enum 'tmp.Number' declared here
|
||||
Reference in New Issue
Block a user