]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/compilation/Elaboration.java
(refs #7459) Fixed check for alread defined value name in the module.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / compilation / Elaboration.java
index ff5ee3b2902fa0384258f246776d534dbed0d617..ec32ea2981ec9cb68692a7126c4398049e986968 100644 (file)
@@ -712,7 +712,7 @@ public class Elaboration {
                     type);
             if(callJava != null) {
                 NameExistenceChecks.checkIfValueExists(errorLog, javaMethod.location,
-                        importedEnvironment, name);
+                        importedEnvironment, module, name);
                 SCLValue value = module.addValue(name, callJava);
                 value.definitionLocation = javaMethod.methodName.location;
                 if(isPrivate)
@@ -1137,7 +1137,7 @@ public class Elaboration {
                 value.setType(constructor.getType());
                 
                 NameExistenceChecks.checkIfValueExists(errorLog, constructor.loc,
-                        importedEnvironment, constructor.name.name);
+                        importedEnvironment, module, constructor.name.name);
                 if(module.addValue(value)) {
                     errorLog.log(constructor.loc,
                             "Value " + constructor.name.name + " is already defined.");
@@ -1152,7 +1152,7 @@ public class Elaboration {
                 SCLValue value = method.createValue();
                 value.definitionLocation = method.location;
                 NameExistenceChecks.checkIfValueExists(errorLog, Locations.NO_LOCATION,
-                        importedEnvironment, value.getName().name);
+                        importedEnvironment, module, value.getName().name);
 
                 if(module.addValue(value)) {
                     String name = method.getName();
@@ -1172,7 +1172,7 @@ public class Elaboration {
             
             long location = valueDefinitionsAst.getLocation(name);
             NameExistenceChecks.checkIfValueExists(errorLog, location,
-                    importedEnvironment, value.getName().name);
+                    importedEnvironment, module, value.getName().name);
             value.definitionLocation = location;
             if(module.addValue(value))
                 errorLog.log(location, "Value " + name + " is already defined.");