Opened 14 years ago

Last modified 14 years ago

#1350 closed defect (fixed)

Invalid patterns are accepted by OMC

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone: Bootstrapping
Component: Instantiation Version:
Keywords: Cc: Martin Sjölund,

Description

Non-existing fields are accepted:
{{{uniontype Ut

record UT
end UT;

end Ut;

function fn

input Ut ut;
output String str;

algorithm

str := match ut

case UT(exp = 1) then "fail1";
else "fail2";

end match;

end fn;}}}

Duplicate fields are accepted:
{{{uniontype Ut

record UT

Integer exp;

end UT;

end Ut;

function fn

input Ut ut;
output String str;

algorithm

str := match ut

case UT(exp = 1, exp = 2) then "fail1";
else "fail2";

end match;

end fn;}}}

Change History (1)

comment:1 by Martin Sjölund, 14 years ago

Fixed in r6918

Note: See TracTickets for help on using tickets.