File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1795,8 +1795,8 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
1795
1795
1796
1796
if (options.emitLocalVarInfo && locals.currentContextSize > 0 ) {
1797
1797
// Open a new scope after allocating context.
1798
- asm.localVariableTable.enterScope (
1799
- asm.offset, locals.currentContextLevel, function.fileOffset);
1798
+ asm.localVariableTable.enterScope (asm.offset, locals.currentContextLevel,
1799
+ function != null ? function.fileOffset : enclosingMember .fileOffset);
1800
1800
}
1801
1801
1802
1802
if (locals.hasCapturedParameters) {
@@ -1811,8 +1811,10 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
1811
1811
_genStoreVar (locals.capturedReceiverVar);
1812
1812
}
1813
1813
}
1814
- function.positionalParameters.forEach (_copyParamIfCaptured);
1815
- locals.sortedNamedParameters.forEach (_copyParamIfCaptured);
1814
+ if (function != null ) {
1815
+ function.positionalParameters.forEach (_copyParamIfCaptured);
1816
+ locals.sortedNamedParameters.forEach (_copyParamIfCaptured);
1817
+ }
1816
1818
}
1817
1819
}
1818
1820
You can’t perform that action at this time.
0 commit comments