langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
changeset 5648 e8aa492874b5
parent 5489 e7af65bf7577
child 5651 f4d2c9708300
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu May 13 11:30:28 2010 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Wed May 19 16:41:57 2010 +0100
@@ -915,7 +915,7 @@
                 List<Type> actuals = tree.type.allparams();
                 List<JCExpression> args = tree.arguments;
                 List<Type> forms = tree.type.tsym.type.getTypeArguments();
-                ListBuffer<TypeVar> tvars_buf = new ListBuffer<TypeVar>();
+                ListBuffer<Type> tvars_buf = new ListBuffer<Type>();
 
                 // For matching pairs of actual argument types `a' and
                 // formal type parameters with declared bound `b' ...
@@ -946,12 +946,15 @@
                 }
 
                 args = tree.arguments;
-                List<TypeVar> tvars = tvars_buf.toList();
+                List<Type> tvars = tvars_buf.toList();
 
                 while (args.nonEmpty() && tvars.nonEmpty()) {
+                    Type actual = types.subst(args.head.type,
+                        tree.type.tsym.type.getTypeArguments(),
+                        tvars_buf.toList());
                     checkExtends(args.head.pos(),
-                                 args.head.type,
-                                 tvars.head);
+                                 actual,
+                                 (TypeVar)tvars.head);
                     args = args.tail;
                     tvars = tvars.tail;
                 }