Open Zipperdoodle opened 1 week ago
Never mind. Aliasing is broken anyway. Even if I don't use nested types, I can't alias a generic into a specific type and have the type checker accept it as an alias. It just sees it as a altogether different type.
This also means that coding with generics becomes very unwieldy very quickly. Because you have to write out the whole mess all the time making the code all but unreadable and unmaintainable. Makes it very tempting to slap on some kind of macro preprocessor that does simple template substitution, as that would be better than this.
Hi, I reduced the issue down to the following.
This works:
But this doesn't:
The latter version crashes the compiler with the following runtime error:
tl.lua:4273: bad argument #1 to 'concat' (table expected, got nil)
Here is the relevant code section in tl.lua: