mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-06 18:54:12 +00:00
Remove switch in in favour of switch _ in
This commit is contained in:
@@ -1354,13 +1354,13 @@ partial_switch :: proc() {
|
||||
{ // union
|
||||
Foo :: union {int, bool}
|
||||
f: Foo = 123
|
||||
switch in f {
|
||||
switch _ in f {
|
||||
case int: fmt.println("int")
|
||||
case bool: fmt.println("bool")
|
||||
case:
|
||||
}
|
||||
|
||||
#partial switch in f {
|
||||
#partial switch _ in f {
|
||||
case bool: fmt.println("bool")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user