]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Data types imported from Java cannot be trivial 52/2652/1
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Fri, 15 Feb 2019 14:39:02 +0000 (16:39 +0200)
committerHannu Niemistö <hannu.niemisto@semantum.fi>
Fri, 15 Feb 2019 14:39:02 +0000 (16:39 +0200)
Change-Id: I8740ddd940708ab1dbf60e958e04dff6082a0cbb

bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/Elaboration.java

index 56e8eb3b66cc0cecaed1d4aa647e57ee7d180b1c..621c97684b86348be9d5bd11f331c0185e0635df 100644 (file)
@@ -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);