Remove switch in in favour of switch _ in
This commit is contained in:
1 parent
49ab935ae9
commit
cd74cdfdaf
6 files changed
+13
-10
No files matched your search
@@ -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