+ if(SCLCompilerConfiguration.ALLOW_OVERLOADING) {
+ SCLValue value2;
+ try {
+ value2 = base.getValue(name);
+ } catch(AmbiguousNameException e) {
+ if(value != null) {
+ String[] conflictingModules = Arrays.copyOf(e.conflictingModules, e.conflictingModules.length+1);
+ conflictingModules[e.conflictingModules.length] = module.getName();
+ throw new AmbiguousNameException(Arrays.asList(conflictingModules), e.name);
+ }
+ else
+ throw e;
+ }
+ if(value == null)
+ return value2;
+ if(value2 == null)
+ return value;
+ throw new AmbiguousNameException(Arrays.asList(value.getName().module, value2.getName().module), value.getName().name);
+ }
+ else {
+ if(value != null)
+ return value;
+ return base.getValue(name);
+ }