Opened 14 years ago
Last modified 14 years ago
#1351 closed defect (fixed)
OMC does not detect local non-component elements
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Martin Sjölund, |
Description
The following should generate an error instead of silently failing.
{{{class ErrorLocalElement
function fn
input Integer i;
output Integer o;
algorithm
o := match i
local
type t = Integer;
T t;
case t then t;
end match;
end fn;
constant Integer i = fn(1);
end ErrorLocalElement;}}}
There is similar code in the compiler that needs to be fixed (the compiler introduces new types that are subtypeof Any).
Note:
See TracTickets
for help on using tickets.
Fixed in r6924 with testcase meta/ErrorLocalElement.mo