Skip to content

Commit 727beac

Browse files
committed
[NF] Handle records inherited by non-records better.
- Don't try to instantiate the constructor for a record that's been inherited by a non-record, since it's not actually a record in that context.
1 parent 43c7a2d commit 727beac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

OMCompiler/Compiler/NFFrontEnd/NFInst.mo

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,6 +2224,8 @@ algorithm
22242224
CachedData cache;
22252225

22262226
case Type.COMPLEX(complexTy = ComplexType.RECORD(node))
2227+
// Make sure it's really a record, and not e.g. a record inherited by a model.
2228+
guard InstNode.isRecord(node)
22272229
algorithm
22282230
instRecordConstructor(node);
22292231
then

0 commit comments

Comments
 (0)