Be able to use nil as a compile-time known constant
#6910
godalming123
started this conversation in
Ideas/Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my case, I'm working on a comiler, with the following code:
Type :: OrderedHashSetSlotRef string_type :: Type{max(u32)} int_type :: Type{max(u32) - 1} uint_type :: Type{max(u32) - 2} float_type :: Type{max(u32) - 3} bool_type :: Type{max(u32) - 4} invalid_type :: Type{max(u32) - 5} unknown_type :: Type{max(u32) - 6} type_type :: Type{max(u32) - 7} any_type :: Type{max(u32) - 8} max_index :: max(u32) - 9 CompileTimeValue :: union { StringLiteralValue, NumberValue, BoolValue, Type, CheckedFuncRef, } CheckedGlobalValue :: struct { type: Type, value: CompileTimeValue, } uninitialised_global_value :: CheckedGlobalValue{unknown_type, nil} // This line of code causes an errorBeta Was this translation helpful? Give feedback.
All reactions