'omit' matching mechanism shouldn't be allowed for union fields
Submitted by Botond Baranyi
Link to original bug (#559422)
Description
Example: module UnionAndOmitBug {
type component CT{}
type union UU { integer a, charstring s }
testcase tc_omitInUnion() runs on CT { var template UU vtu := { a := 42 } vtu.s := omit; //DTE in java, accepted in cpp //suggested: semantic error: 'omit' value is not allowed in this context + runtime: better output }
testcase tc_semanticErrorExpected2() runs on CT { var template UU vtu := { a := omit } //ok: error marker: 'omit' value is not allowed in this context; compiler error in cpp, runtime error in java. }
}
Version: 6.6.0