Rewriting field.accesses that evaluate to constants
This commit is contained in:
6
enums.kl
6
enums.kl
@@ -2,12 +2,13 @@
|
||||
Thing :: struct
|
||||
len: int
|
||||
|
||||
|
||||
Constant_String :: "Test"
|
||||
Constant :: 10
|
||||
Thing_Kind :: enum
|
||||
None
|
||||
Thing_Not
|
||||
|
||||
test_string := Thing.Constant_String
|
||||
thing: Thing
|
||||
access := thing.len
|
||||
test := Thing.Thing_Kind.Thing_Not
|
||||
@@ -19,4 +20,5 @@ Allocator_Kind :: enum
|
||||
Heap
|
||||
|
||||
|
||||
kind := Allocator_Kind.Heap
|
||||
kind := Allocator_Kind.Heap
|
||||
|
||||
|
||||
Reference in New Issue
Block a user