View | Details | Raw Unified | Return to bug 351317
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java (+3 lines)
Lines 6745-6750 Link Here
6745
									0, // dims
6745
									0, // dims
6746
									(((long)typeExpr.sourceStart)<<32)+typeExpr.sourceEnd);
6746
									(((long)typeExpr.sourceStart)<<32)+typeExpr.sourceEnd);
6747
	RoleClassLiteralAccess literal = new RoleClassLiteralAccess(typeRef);
6747
	RoleClassLiteralAccess literal = new RoleClassLiteralAccess(typeRef);
6748
	this.intPtr--; // discard start of '.class'
6749
	literal.sourceEnd = this.intStack[this.intPtr--];
6750
	this.intPtr--; // discard start of type arguments ('<')
6748
	pushOnExpressionStack(literal);
6751
	pushOnExpressionStack(literal);
6749
}
6752
}
6750
// SH}
6753
// SH}
(-)otjld/org/eclipse/objectteams/otdt/tests/otjld/api/Reflection.java (+28 lines)
Lines 946-951 Link Here
946
            null/*no custom requestor*/);
946
            null/*no custom requestor*/);
947
    }
947
    }
948
948
949
    // getRole(Object) called
950
    // Bug 351317 - Error in (redundant) cast of anchored type
951
    public void test923_getRoleMethod4() {
952
       
953
       runConformTest(
954
            new String[] {
955
		"Team923grm4.java",
956
			    "\n" +
957
			    "public team class Team923grm4 {\n" +
958
			    "    public class R playedBy T923grm4 {\n" +
959
			    "        public String toString() { return \"OK\"; }\n" +
960
			    "    }\n" +
961
			    "    Team923grm4(T923grm4 as R o) {}\n" +
962
			    "    public static void main (String[] args0) {\n" +
963
			    "        T923grm4 o = new T923grm4();\n" +
964
			    "        final Team923grm4 t = new Team923grm4(o);\n" +
965
			    "        R<@t> r = (R<@t>) t.getRole(o, R<@t>.class);\n" + 
966
			    "        System.out.print(r);\n" +
967
			    "    }\n" +
968
			    "}    \n" +
969
			    "    \n",
970
		"T923grm4.java",
971
			    "\n" +
972
			    "public class T923grm4 {}\n"
973
            },
974
            "OK");
975
    }
976
949
    // a replace callin tests the reflective function isExecutingCallin
977
    // a replace callin tests the reflective function isExecutingCallin
950
    // 9.2.4-otjld-is-executing-callin-called-1
978
    // 9.2.4-otjld-is-executing-callin-called-1
951
    public void test924_isExecutingCallinCalled1() {
979
    public void test924_isExecutingCallinCalled1() {

Return to bug 351317