Skip to content

Commit 98dcd8d

Browse files
committed
Fix return() scope lookup
Fixup for `Typecheck return()`.
1 parent 1514a1f commit 98dcd8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/laytonsmith/core/functions/ControlFlow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2437,7 +2437,7 @@ public CClassType typecheck(StaticAnalysis analysis,
24372437
// Resolve this returnable reference to its returnable declaration to get its required return type.
24382438
Scope scope = analysis.getTermScope(ast);
24392439
if(scope != null) {
2440-
Set<Declaration> decls = scope.getReachableDeclarations(Namespace.RETURNABLE, null);
2440+
Set<Declaration> decls = scope.getDeclarations(Namespace.RETURNABLE, null);
24412441
if(decls.size() == 0) {
24422442
exceptions.add(new ConfigCompileException("Return is not valid in this context.", ast.getTarget()));
24432443
} else {

0 commit comments

Comments
 (0)