Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5157 closed defect (invalid)

Another issue with NFTyping.typeBindings

Reported by: casella Owned by: perost
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Please check Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_DOL. The NF fails with

[/Modelica trunk/Magnetic/FundamentalWave.mo:7031:9-7035:80:writable] 
Error: Type mismatch in binding fixed = true,
expected subtype of Boolean[2], got type Boolean.

Change History (3)

comment:1 Changed 6 years ago by casella

  • Component changed from *unknown* to New Instantiation
  • Milestone changed from Future to 2.0.0
  • Owner changed from somebody to perost

comment:2 Changed 6 years ago by perost

  • Resolution set to invalid
  • Status changed from new to closed

The error is correct, I've opened a pull request for the MSL here.

comment:3 Changed 6 years ago by ceraolo

I came across this type or error message a few times, and found it a little cryptic for the final user.

It would be clearer to read

Error: Type mismatch in binding fixed = true,
expected type Boolean[2], got type Boolean.

but I understand that this would be somewhat imprecise.

I have two ideas to improve the situation:

option 1) OM uses the message I proposed (i.e. using the word type instead of subtype of) for built-in types (Real, Integer, String, Boolean and, hopefully, Complex) and the message containing
subtype of in the other cases

option 2) OM uses the message I proposed (i.e. using the word type instead of subtype of) outright. In this case we leave to the user the understanding that also subtypes would be allowable

Note: See TracTickets for help on using tickets.