Rewriting field.accesses that evaluate to constants

This commit is contained in:
Krzosa Karol
2022-05-31 13:39:34 +02:00
parent 1168965ba4
commit 369418b042
3 changed files with 28 additions and 30 deletions

View File

@@ -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