Typen Methoden werden nicht bei Methodcalls nicht eingesetzt. #188

Closed
opened 2016-07-14 01:15:35 +00:00 by pl · 1 comment
Owner

In

class OL {

m(x) { return x + x; }

Boolean m(x) { return x || x; }

}

class Main {

main(x) { 
	ol;
	ol = new OL();
	return ol.m(x); 
} 

}

wird Folgendes falsch erzeugt:

public java.lang.Object main(java.lang.Boolean);
descriptor: (Ljava/lang/Boolean;)Ljava/lang/Object;
flags: ACC_PUBLIC
Signature: #30 // (Ljava/lang/Boolean;)Ljava/lang/Object;
Code:
stack=2, locals=3, args_size=2
0: new #8 // class OL
3: dup
4: invokespecial #12 // Method OL."":()V
7: astore_2
8: aload_2
9: aload_1
FALSCH:
10: invokevirtual #32 // Method OL.m:(Ljava/lang/Boolean;)Ljava/lang/Object;
HIER MUESSTE
10: invokevirtual ... // Method OL.m:(Ljava/lang/Boolean;)Ljava/lang/Boolean;
STEHEN
13: areturn

In class OL { m(x) { return x + x; } Boolean m(x) { return x || x; } } class Main { main(x) { ol; ol = new OL(); return ol.m(x); } } wird Folgendes falsch erzeugt: public java.lang.Object main(java.lang.Boolean); descriptor: (Ljava/lang/Boolean;)Ljava/lang/Object; flags: ACC_PUBLIC Signature: #30 // (Ljava/lang/Boolean;)Ljava/lang/Object; Code: stack=2, locals=3, args_size=2 0: new #8 // class OL 3: dup 4: invokespecial #12 // Method OL."<init>":()V 7: astore_2 8: aload_2 9: aload_1 FALSCH: 10: invokevirtual #32 // Method OL.m:(Ljava/lang/Boolean;)Ljava/lang/Object; HIER MUESSTE 10: invokevirtual ... // Method OL.m:(Ljava/lang/Boolean;)Ljava/lang/Boolean; STEHEN 13: areturn
Owner

OLD BUG

OLD BUG
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: JavaTX/JavaCompilerCore#188
No description provided.