Opened 10 years ago
Last modified 4 years ago
#2986 new defect
Trying to use a partial function gives linker error instead of compilation error
Reported by: | Per Östlund | Owned by: | somebody |
---|---|---|---|
Priority: | normal | Milestone: | Future |
Component: | MetaModelica | Version: | trunk |
Keywords: | Cc: |
Description
Trying to run this:
function f input FuncType inFunc; input Real x; output Real y := FuncType(x); // This is wrong, should be inFunc(x) partial function FuncType input Real x; output Real y; end FuncType; end f; function f2 input Real x; output Real y := 2 * x; end f2; function test output Real x := f(f2, 3.0); end test;
gives the error
"Error: OMC unable to load `./test.so': ./test.so: undefined symbol: omc_f_FuncType.
It would be better if it gave an error for trying to use a partial function instead.
Change History (2)
comment:1 by , 10 years ago
Component: | Bootstrapping → Frontend |
---|---|
Owner: | changed from | to
comment:2 by , 4 years ago
Component: | Frontend → MetaModelica |
---|
Note:
See TracTickets
for help on using tickets.
Works with the new frontend which will correctly give an error that
FuncType
is partial, but since MetaModelica uses the old frontend it's still an issue.