disambiguate enum blocks and complete distinct type operations
This commit is contained in:
@@ -24,6 +24,12 @@ Config :: struct {
|
||||
maybe ?i32
|
||||
payload Payload
|
||||
}
|
||||
Count :: distinct i32
|
||||
Byte :: distinct u8
|
||||
Ratio :: distinct f32
|
||||
Inner :: distinct u32
|
||||
Outer :: distinct Inner
|
||||
|
||||
|
||||
first Config :: Config {
|
||||
enabled = true,
|
||||
@@ -105,6 +111,19 @@ main func(init process.Init) i32 {
|
||||
}) catch |_| {
|
||||
return 3
|
||||
}
|
||||
io.print(writer, "{} {d} {b} {o} {x} {X} {c} {e} {}\n", {
|
||||
Count(i32(-42)),
|
||||
Count(i32(-42)),
|
||||
Byte(u8(10)),
|
||||
Byte(u8(10)),
|
||||
Byte(u8(255)),
|
||||
Byte(u8(255)),
|
||||
Byte(u8('A')),
|
||||
Ratio(f32(1.5)),
|
||||
Outer(Inner(u32(7))),
|
||||
}) catch |_| {
|
||||
return 4
|
||||
}
|
||||
debug.print("debug={} {x}\n", {State.idle, 42})
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user