Open chaoticbob opened 4 days ago
The same issue is observed with typealias
.
a.slang(8): internal error 99999: unexpected condition encountered in Slang compiler: unknown type modifier in semantic checking
typealias myConstUint = const MyStruct;
^~~~~
I don't think Slang will fully support const
keyword in the way it works in C/C++.
And I think we can make some changes to workaround this issue as a short term solution.
But there should be a long term plan to figure out how to handle the const
keyword in general.
@swoods-nv for visibility.
In Slang, we currently treat const as a modifier for the var decl instead of a modifier for the type. Type modifiers are much harder to implement (need to take care of all the coercion and overloading rules etc.)
We may not want to allow it in slang for simplicity.
When using
const
in atypedef
statement I get his error:Just curious if
typedef
is limited to just the type itself.Shader