throw new WeaselCompilerException(token.line, "return need to return %s", retClass);
}
WeaselCompilerReturn wcr = tree.compile(compiler, compilerHelpher, null, retClass, null, false);
instructions = wcr.getInstructions();
WeaselTree.autoCast(compiler, wcr.getReturnType(), retClass, token.line, instructions, true);
instructions.add(token.line, new WeaselInstructionReturn(compilerHelpher.getVarCount()));
}
return new WeaselCompilerReturnInstructionList(instructions, new WeaselGenericClass(compiler.baseTypes.voidClass));
}