Opened 7 years ago

Closed 7 years ago

#4602 closed defect (worksforme)

Complex type not found anymore

Reported by: massimo ceraolo Owned by: somebody
Priority: critical Milestone: 1.13.0
Component: *unknown* Version:
Keywords: Cc:

Description (last modified by massimo ceraolo)

Consider the following model:

model TestSimpleComplex
  parameter Complex z=Complex(1,2);
end TestSimpleComplex;

The Complex type used to be found without issues with OM. But build v1.13.0-dev-89 says:

[1] 16:14:45 Translation Error
[TestSimpleComplex: 2:3-2:35]: Class Complex not found in scope TestSimpleComplex.

[2] 16:14:45 Translation Error
Error occurred while flattening model TestSimpleComplex


Change History (4)

comment:1 by massimo ceraolo, 7 years ago

Description: modified (diff)

comment:2 by Martin Sjölund, 7 years ago

As far as I know, Complex would only be found if the library was already loaded (and it usually is if MSL is loaded).

This works even if Complex was not already loaded:

model TestSimpleComplex
  parameter Complex z=Complex(1,2);
  annotation(uses(Complex(version="3.2.2")));
end TestSimpleComplex;

comment:3 by massimo ceraolo, 7 years ago

Ah.
Indeed, I don't know why, dev 89 did not load Complex.
I've checked on another PC in which I have dev 166, and it loads correctly.
I'm going to close this ticket.

comment:4 by massimo ceraolo, 7 years ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.