transformation bug440514; | |
main() { | |
var a : Boolean := invalid; | |
// OCL IfExp | |
var a1 = if a then 1 else 2 endif; | |
assert fatal (a1.oclIsInvalid()); | |
// SwitchExp (imperative 'if-then-else') | |
var a2 = switch { | |
case (a) 1; | |
case (false) 2; | |
else 3; | |
}; | |
assert fatal (a2.oclIsInvalid()); | |
// Imperative 'if-then-else' | |
var a3 = if (a) then 1 elif 2 then 3 else 4 endif; | |
assert fatal (a3.oclIsInvalid()); | |
} |