]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/NameExistenceChecks.java
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / compilation / NameExistenceChecks.java
index 1f45c5f41a9d88c8345686e70fcd8b4834dd37ff..090f200c437a7ff4049fb5d79127ddc5795d3df6 100644 (file)
@@ -1,7 +1,7 @@
 package org.simantics.scl.compiler.compilation;\r
 \r
 import org.simantics.scl.compiler.elaboration.modules.SCLValue;\r
-import org.simantics.scl.compiler.elaboration.modules.TypeConstructor;\r
+import org.simantics.scl.compiler.elaboration.modules.TypeDescriptor;\r
 import org.simantics.scl.compiler.environment.AmbiguousNameException;\r
 import org.simantics.scl.compiler.environment.Environment;\r
 import org.simantics.scl.compiler.errors.ErrorLog;\r
@@ -32,11 +32,11 @@ public class NameExistenceChecks {
     public static void checkIfTypeExists(ErrorLog errorLog, long location,\r
             Environment environment, String name) {\r
         try {\r
-            TypeConstructor value = environment.getLocalNamespace().getTypeConstructor(name);\r
-            if(value != null)\r
+            TypeDescriptor tdesc = environment.getLocalNamespace().getTypeDescriptor(name);\r
+            if(tdesc != null)\r
                 errorLog.log(location,\r
                         "Type " + name + " is already defined in the module " + \r
-                                value.name.module + \r
+                                tdesc.name.module + \r
                         " that is imported to the default namespace.");\r
         } catch(AmbiguousNameException e) {\r
             errorLog.log(location,\r