Faculty Probleme #47
Labels
No Label
Codegen
confirmed
duplicate
Eclipse-Plugin
Feature Request
generics
in progress
invalid
JavaCompilerCore
needs info
Parser
Trash
Type
Unify
won't fix
works for me
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: JavaTX/JavaCompilerCore#47
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
import java.lang.Integer;
//import java.lang.Long;
//import java.lang.Short;
public class Faculty {
public fact;
Faculty() {
fact = (x) -> {
if (x == 1) {
return 1;
}
else {
return x * (fact.apply(x-1));
}
};
}
liefert
Exception in thread "main" java.lang.VerifyError: Bad return type
Exception Details:
Location:
Faculty.getFact(Ljava/lang/Integer;)Ljava/lang/Integer; @8: areturn
Reason:
Type 'java/lang/Object' (current frame, stack[0]) is not assignable to 'java/lang/Integer' (from method signature)
Current Frame:
bci: @8
flags: { }
locals: { 'Faculty', 'java/lang/Integer' }
stack: { 'java/lang/Object' }
Bytecode:
0000000: 2ab4 002c 2bb6 0030 b0
Gefixt
branch bytecode2
commit
857d63322e
getestet funktioniert