Describe the bug
When a typed enum with typed literal initializations have incompatible types, the type is silently defaulted to the type of the enum. This should raise a validation error or warning.
To Reproduce
Steps to reproduce the behavior:
TYPE
myEnum : (e1 := LINT#20, e2 := BYTE#30) BYTE;
END_TYPE
Results in the IR:
@myEnum.e2 = unnamed_addr constant i8 30
@myEnum.e1 = unnamed_addr constant i8 20
Expected behavior
A validation error or warning should be raised showing that the type LINT is incorrect for the enum definition (or will be truncated).
Describe the bug
When a typed enum with typed literal initializations have incompatible types, the type is silently defaulted to the type of the enum. This should raise a validation error or warning.
To Reproduce
Steps to reproduce the behavior:
Results in the IR:
Expected behavior
A validation error or warning should be raised showing that the type
LINTis incorrect for the enum definition (or will be truncated).