This commit is contained in:
agra
2026-03-02 21:00:55 +02:00
parent 2f4f898d54
commit bbb5426777
42 changed files with 483 additions and 9023 deletions

View File

@@ -1,23 +0,0 @@
// Issue: match on u8 value with enum result assigned to typed field
// The switch value is u8 but case constants are s64 (default int literal type).
// Compiler should cast case constants to match the switch value type.
// LLVM error: Switch constants must all be same type as switch value!
out :: (str: string) -> void #builtin;
Button :: enum {
none;
left;
middle;
right;
}
main :: () {
val : u8 = 2;
result : Button = if val == {
case 1: .left;
case 2: .middle;
case 3: .right;
else: .none;
};
}