Wrong error message after subtype violation
Summary
Subtyping bitstring and then violating the subtype does not result in the most accurate error message.
Steps and/or TTCN-3 code to reproduce
Create a TTCN-3 module with the following contents:
type bitstring mybs ('0'B, '1'B);
control{
var mybs mbs := '01'B;
}
Build, and regard the error message.
What is the current bug behavior?
Error message is: '01'B is not a valid value for type `bitstring' which has subtype length(1)
What is the expected correct behavior?
Error message is: '01'B is not a valid value for type `bitstring' which has subtype ('1'B,'0'B)
The reason is that the subtype in this case was not created with a length restriction (however, the domain of the subtype is eventually the same as if we had defined a length(1) restriction).
Relevant logs and/or screenshots
Possible fixes
Titan version
8.1.0
Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt