From e640cf916c29ece31c47d99dd6f2a4ec957638f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Fri, 15 Feb 2019 16:39:02 +0200 Subject: [PATCH] Data types imported from Java cannot be trivial Change-Id: I8740ddd940708ab1dbf60e958e04dff6082a0cbb --- .../org/simantics/scl/compiler/compilation/Elaboration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.47.1