Sample code #1:
const uint8 foo = 0;
int bar = foo;
Sample code #2:
const uint16 foo = 0;
void bar(int16) {}
void main() {
bar(foo);
}
The assertion failure happens when function asCCompiler::ImplicitConversionConstant calls asCExprValue::GetConstantDW, which expects a type of exactly 4 bytes in size.