Ticket #16004

オーバーロードのあるメソッドの同定に失敗する

Date d'ouverture: 2009-04-07 16:01 Dernière mise à jour: 2009-04-13 17:07

Rapporteur:
Propriétaire:
(Aucun)
Type:
État:
Ouvert
Composant:
(Aucun)
Jalon:
(Aucun)
Priorité:
5 - moyen
Sévérité:
9 - le plus élevé
Résolution:
Fixed
Fichier:
Aucun

Détails

class A と class B があり、B extends Aの関係にあるとき、

public class Hoge {
	public static void hoge(A a) {
		System.out.println("#hoge(A)");
	}
	public static void hoge(B b) {
		System.out.println("#hoge(B)");
	}
	public static void main(String[] args) throws Exception {
		FastReflect.invoke("Hoge", null, "hoge", new B());
	}
}

とした場合、 Javaの言語仕様に習うのであれば呼び出されるべきはhoge(B)だが、 hoge(A)側が呼び出される。

Ticket History (2/2 Histories)

2009-04-07 16:01 Updated by: nagise
  • New Ticket "オーバーロードのあるメソッドの同定に失敗する" created
2009-04-13 17:07 Updated by: matya
  • Résolution Update from Aucun to Fixed
Commentaire

nagiseさん。ご指摘ありがとうございます。バージョン1.0.1にて修正いたしました。

Attachment File List

No attachments

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion