patch from Natasha to fix local var table 0 for function literals

This commit is contained in:
Alex Tkachman
2012-05-22 19:10:59 +03:00
parent b63d3905f9
commit f15cb22809
4 changed files with 244 additions and 0 deletions
@@ -245,6 +245,12 @@ public class FunctionCodegen {
mv.visitLocalVariable("this", type.getDescriptor(), null, methodBegin, methodEnd, k++);
}
if (fun instanceof JetFunctionLiteralExpression) {
Type type = state.getInjector().getJetTypeMapper().mapType(
context.getThisDescriptor().getDefaultType(), MapTypeMode.VALUE);
mv.visitLocalVariable("this", type.getDescriptor(), null, methodBegin, methodEnd, k++);
}
if(receiverParameter.exists()) {
Type type = state.getInjector().getJetTypeMapper().mapType(receiverParameter.getType(), MapTypeMode.VALUE);
// TODO: specify signature