From: Hannu Niemistö Date: Fri, 15 Feb 2019 14:39:02 +0000 (+0200) Subject: Data types imported from Java cannot be trivial X-Git-Tag: v1.43.0~136^2~195^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=e640cf916c29ece31c47d99dd6f2a4ec957638f7;p=simantics%2Fplatform.git Data types imported from Java cannot be trivial Change-Id: I8740ddd940708ab1dbf60e958e04dff6082a0cbb --- diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/Elaboration.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/Elaboration.java index 56e8eb3b6..621c97684 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/Elaboration.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/Elaboration.java @@ -374,7 +374,8 @@ public class Elaboration { } boolean trivialDataType = dataTypeAst.constructors.length == 1 && - dataTypeAst.constructors[0].parameters.length == 1; + dataTypeAst.constructors[0].parameters.length == 1 && + !external; if(className == null && !trivialDataType) className = compilationContext.namingPolicy.getDataTypeClassName(dataTypeAst.name);