|
@@ -190,8 +190,13 @@ public class JavaStatementVisitor implements StatementVisitor<Boolean> {
|
190
|
190
|
@Override
|
191
|
191
|
public Boolean visitReturn(ReturnStatement statement) {
|
192
|
192
|
javaWriter.position(statement.position.fromLine);
|
193
|
|
- statement.value.accept(expressionVisitor);
|
194
|
|
- javaWriter.returnType(context.getType(statement.value.type));
|
|
193
|
+ if(statement.value == null) {
|
|
194
|
+ javaWriter.ret();
|
|
195
|
+ } else {
|
|
196
|
+ statement.value.accept(expressionVisitor);
|
|
197
|
+ javaWriter.returnType(context.getType(statement.value.type));
|
|
198
|
+ }
|
|
199
|
+
|
195
|
200
|
return true;
|
196
|
201
|
}
|
197
|
202
|
|