sm
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
// Issue: top-level constants from imported files are not visible
|
||||
// COLOR_WHITE works after fix, but ALIGN_CENTER (struct with enum fields) does not.
|
||||
// Error: undefined identifier 'ALIGN_CENTER'
|
||||
|
||||
#import "modules/std.sx";
|
||||
#import "examples/issue-0004-defs.sx";
|
||||
|
||||
Thing :: struct {
|
||||
color: Color;
|
||||
alignment: Alignment;
|
||||
|
||||
make :: () -> Thing {
|
||||
Thing.{ color = COLOR_WHITE, alignment = ALIGN_CENTER };
|
||||
}
|
||||
}
|
||||
|
||||
main :: () {
|
||||
t := Thing.make();
|
||||
print("{}\n", t.color.r);
|
||||
}
|
||||
Reference in New Issue
Block a user