@Test(expected = IllegalStateException.class) public void shouldThrow_whenEnteringScopeWithoutModuleName() { rootScope.enterScope(); }
@Override public Scope enterScope(String moduleName) { Scope scope = new ModuleScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName); children.put(moduleName, scope); return scope; }
RootScope extends Scope { @Override public Scope enterScope(String moduleName) { Scope scope = new ModuleScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName); children.put(moduleName, scope); return scope; } }
RootScope extends Scope { @Override public Scope enterScope(String moduleName) { Scope scope = new ModuleScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName); children.put(moduleName, scope); return scope; } RootScope(SymbolGenerator symbolGenerator, SymbolResolver resolver); }
RootScope extends Scope { @Override public Scope enterScope(String moduleName) { Scope scope = new ModuleScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName); children.put(moduleName, scope); return scope; } RootScope(SymbolGenerator symbolGenerator, SymbolResolver resolver); @Override void addDependency(Symbol symbol); @Override void addPattern(Symbol symbol, PatternCase pattern); @Override void defineDataType(Symbol symbol, DataTypeDescriptor descriptor); @Override void defineDataConstructor(Symbol symbol, DataConstructorDescriptor descriptor); @Override Unification bind(VariableType variableType, Type target); @Override void defineOperator(Symbol symbol, Operator operator); @Override void defineSignature(Symbol symbol, Type type); @Override void defineValue(Symbol symbol, Type type); @Override Scope enterScope(String moduleName); @Override void extendContext(Type type, Set<Symbol> additionalContext); @Override void generalize(Type type); @Override Type generate(Type type); @Override Set<Symbol> getContext(Type type); @Override Set<Symbol> getDependencies(); @Override Optional<TypeClassDescriptor> getMemberOf(ValueReference valueRef); @Override Optional<Operator> getOperator(Symbol symbol); @Override Scope getParent(); @Override Map<Symbol, List<PatternCase>> getPatternCases(); @Override Optional<Type> getRawValue(Symbol symbol); @Override Optional<Type> getSignature(Symbol symbol); @Override Type getTarget(Type type); @Override void implement(Symbol typeClass, SumType type); @Override Optional<TypeClassDescriptor> getTypeClass(ClassReference classRef); @Override Set<TypeInstanceDescriptor> getTypeInstances(Symbol typeClass, List<? extends Type> parameters); @Override Optional<MethodSignature> getValueSignature(Symbol symbol); @Override boolean isBound(VariableType type); @Override boolean isGeneric(VariableType variableType); @Override boolean isImplemented(Symbol typeClass, SumType type); @Override boolean isDefined(Symbol symbol); @Override boolean isOperator_(Symbol symbol); @Override Scope leaveScope(); @Override Optional<Symbol> qualify(Symbol symbol); @Override Symbol qualifyCurrent(Symbol symbol); @Override Symbol reserveSymbol(); @Override Symbol reserveSymbol(List<String> nestings); @Override VariableType reserveType(); @Override void specialize(Type type); }
RootScope extends Scope { @Override public Scope enterScope(String moduleName) { Scope scope = new ModuleScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName); children.put(moduleName, scope); return scope; } RootScope(SymbolGenerator symbolGenerator, SymbolResolver resolver); @Override void addDependency(Symbol symbol); @Override void addPattern(Symbol symbol, PatternCase pattern); @Override void defineDataType(Symbol symbol, DataTypeDescriptor descriptor); @Override void defineDataConstructor(Symbol symbol, DataConstructorDescriptor descriptor); @Override Unification bind(VariableType variableType, Type target); @Override void defineOperator(Symbol symbol, Operator operator); @Override void defineSignature(Symbol symbol, Type type); @Override void defineValue(Symbol symbol, Type type); @Override Scope enterScope(String moduleName); @Override void extendContext(Type type, Set<Symbol> additionalContext); @Override void generalize(Type type); @Override Type generate(Type type); @Override Set<Symbol> getContext(Type type); @Override Set<Symbol> getDependencies(); @Override Optional<TypeClassDescriptor> getMemberOf(ValueReference valueRef); @Override Optional<Operator> getOperator(Symbol symbol); @Override Scope getParent(); @Override Map<Symbol, List<PatternCase>> getPatternCases(); @Override Optional<Type> getRawValue(Symbol symbol); @Override Optional<Type> getSignature(Symbol symbol); @Override Type getTarget(Type type); @Override void implement(Symbol typeClass, SumType type); @Override Optional<TypeClassDescriptor> getTypeClass(ClassReference classRef); @Override Set<TypeInstanceDescriptor> getTypeInstances(Symbol typeClass, List<? extends Type> parameters); @Override Optional<MethodSignature> getValueSignature(Symbol symbol); @Override boolean isBound(VariableType type); @Override boolean isGeneric(VariableType variableType); @Override boolean isImplemented(Symbol typeClass, SumType type); @Override boolean isDefined(Symbol symbol); @Override boolean isOperator_(Symbol symbol); @Override Scope leaveScope(); @Override Optional<Symbol> qualify(Symbol symbol); @Override Symbol qualifyCurrent(Symbol symbol); @Override Symbol reserveSymbol(); @Override Symbol reserveSymbol(List<String> nestings); @Override VariableType reserveType(); @Override void specialize(Type type);  }