/hg/icedtea6: Update to b32.
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Wed Jul 30 13:41:49 UTC 2014
changeset faaea522af93 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=faaea522af93
author: Andrew John Hughes <gnu.andrew at redhat.com>
date: Wed Jul 30 14:41:18 2014 +0100
Update to b32.
2014-07-30 Andrew John Hughes <gnu.andrew at redhat.com>
* patches/jtreg-T6638712-fix.patch,
* patches/jtreg-T6650759m-fix.patch,
* patches/openjdk/6638712-wildcard_types.patch,
* patches/openjdk/6650759-missing_inference.patch:
Remove upstreamed patches.
* Makefile.am:
(OPENJDK_DATE): Update to b32 release date.
(OPENJDK_SHA256SUM): Set to hash of new b32 tarball.
(OPENJDK_VERSION): Set to b32.
(ICEDTEA_PATCHES): Drop removed patches.
* patches/openjdk/6636370-appcontext_simplification.patch:
Regenerated.
* patches/openjdk/6729772-opt_cleanup.patch,
* patches/openjdk/6799141-split_out_versions.patch,
* patches/openjdk/6816311-compiler_name.patch,
* patches/windows-awt.patch:
Remove Windows fragments added upstream.
* patches/openjdk/8013057-detect_mmap_commit_failures.patch:
Remove redundant copyright header change.
diffstat:
ChangeLog | 22 +
Makefile.am | 10 +-
patches/jtreg-T6638712-fix.patch | 30 -
patches/jtreg-T6650759m-fix.patch | 6 -
patches/openjdk/6636370-appcontext_simplification.patch | 73 +-
patches/openjdk/6638712-wildcard_types.patch | 563 --------
patches/openjdk/6650759-missing_inference.patch | 884 --------------
patches/openjdk/6729772-opt_cleanup.patch | 399 ++----
patches/openjdk/6799141-split_out_versions.patch | 96 +-
patches/openjdk/6816311-compiler_name.patch | 265 +---
patches/openjdk/8013057-detect_mmap_commit_failures.patch | 189 +-
patches/windows-awt.patch | 78 +-
12 files changed, 349 insertions(+), 2266 deletions(-)
diffs (truncated from 3400 to 500 lines):
diff -r 0e26048bb9e3 -r faaea522af93 ChangeLog
--- a/ChangeLog Tue Jul 29 01:20:12 2014 +0100
+++ b/ChangeLog Wed Jul 30 14:41:18 2014 +0100
@@ -1,3 +1,25 @@
+2014-07-30 Andrew John Hughes <gnu.andrew at redhat.com>
+
+ * patches/jtreg-T6638712-fix.patch,
+ * patches/jtreg-T6650759m-fix.patch,
+ * patches/openjdk/6638712-wildcard_types.patch,
+ * patches/openjdk/6650759-missing_inference.patch:
+ Remove upstreamed patches.
+ * Makefile.am:
+ (OPENJDK_DATE): Update to b32 release date.
+ (OPENJDK_SHA256SUM): Set to hash of new b32 tarball.
+ (OPENJDK_VERSION): Set to b32.
+ (ICEDTEA_PATCHES): Drop removed patches.
+ * patches/openjdk/6636370-appcontext_simplification.patch:
+ Regenerated.
+ * patches/openjdk/6729772-opt_cleanup.patch,
+ * patches/openjdk/6799141-split_out_versions.patch,
+ * patches/openjdk/6816311-compiler_name.patch,
+ * patches/windows-awt.patch:
+ Remove Windows fragments added upstream.
+ * patches/openjdk/8013057-detect_mmap_commit_failures.patch:
+ Remove redundant copyright header change.
+
2014-07-28 Andrew John Hughes <gnu.andrew at redhat.com>
OJ39: Handle fonts with the non-canonical
diff -r 0e26048bb9e3 -r faaea522af93 Makefile.am
--- a/Makefile.am Tue Jul 29 01:20:12 2014 +0100
+++ b/Makefile.am Wed Jul 30 14:41:18 2014 +0100
@@ -1,8 +1,8 @@
# Dependencies
-OPENJDK_DATE = 15_apr_2014
-OPENJDK_SHA256SUM = 362d9bf20e91393b52dd0513896d39831cf320c49bd4bf1e28124f21569b72eb
-OPENJDK_VERSION = b31
+OPENJDK_DATE = 15_jul_2014
+OPENJDK_SHA256SUM = 1a7404f38b3fa7cbb25d4273c0d94885912badd3343c5184c3b0947437501256
+OPENJDK_VERSION = b32
OPENJDK_URL = https://java.net/downloads/openjdk6/
CACAO_VERSION = 68fe50ac34ec
@@ -374,12 +374,8 @@
patches/ipv4-mapped-ipv6-addresses.patch \
patches/jtreg-OpenGLContextInit.patch \
patches/openjdk/6510892-httpserver_test.patch \
- patches/openjdk/6638712-wildcard_types.patch \
- patches/openjdk/6650759-missing_inference.patch \
patches/jtreg-international-fonts.patch \
patches/f14-fonts.patch \
- patches/jtreg-T6638712-fix.patch \
- patches/jtreg-T6650759m-fix.patch \
patches/openjdk/7003777-bad-html-entity-parse.patch \
patches/rendering-engine-tests.patch \
patches/openjdk/6800846-printing-quality.patch \
diff -r 0e26048bb9e3 -r faaea522af93 patches/jtreg-T6638712-fix.patch
--- a/patches/jtreg-T6638712-fix.patch Tue Jul 29 01:20:12 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712a.out 2010-11-30 14:44:29.000000000 +0100
-+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712a.out 2010-11-30 15:27:57.000000000 +0100
-@@ -1,2 +1,2 @@
--T6638712a.java:39:41: compiler.err.invalid.inferred.types: T, (- compiler.misc.inferred.do.not.conform.to.params: java.lang.Iterable<? extends java.util.Comparator<? super java.lang.String>>, java.util.List<java.util.Comparator<?>>)
-+T6638712a.java:16:41: compiler.err.invalid.inferred.types: T, (- compiler.misc.inferred.do.not.conform.to.params: java.lang.Iterable<? extends java.util.Comparator<? super java.lang.String>>, java.util.List<java.util.Comparator<?>>)
- 1 error
---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712b.out 2010-11-30 14:44:29.000000000 +0100
-+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712b.out 2010-11-30 15:27:58.000000000 +0100
-@@ -1,2 +1,2 @@
--T6638712b.java:37:21: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: T, T, java.lang.String)), <T>T, java.lang.String
-+T6638712b.java:14:21: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: T, T, java.lang.String)), <T>T, java.lang.String
- 1 error
---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712c.out 2010-11-30 14:44:29.000000000 +0100
-+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712c.out 2010-11-30 15:27:59.000000000 +0100
-@@ -1,2 +1,2 @@
--T6638712c.java:39:9: compiler.err.cant.apply.symbol: <T>sort(T[],java.util.Comparator<? super T>), T6638712c, , java.lang.Enum[],java.util.Comparator<java.lang.Enum<?>>, null
-+T6638712c.java:16:9: compiler.err.cant.apply.symbol: <T>sort(T[],java.util.Comparator<? super T>), T6638712c, , java.lang.Enum[],java.util.Comparator<java.lang.Enum<?>>, null
- 1 error
---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712d.out 2010-11-30 14:44:29.000000000 +0100
-+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712d.out 2010-11-30 15:28:01.000000000 +0100
-@@ -1,2 +1,2 @@
--T6638712d.java:39:9: compiler.err.cant.apply.symbol: <U>m(U,java.util.List<java.util.List<U>>), T6638712d, , int,java.util.List<java.util.List<java.lang.String>>, null
-+T6638712d.java:16:9: compiler.err.cant.apply.symbol: <U>m(U,java.util.List<java.util.List<U>>), T6638712d, , int,java.util.List<java.util.List<java.lang.String>>, null
- 1 error
---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712e.out 2010-11-30 14:44:29.000000000 +0100
-+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712e.out 2010-11-30 15:28:02.000000000 +0100
-@@ -1,2 +1,2 @@
--T6638712e.java:40:27: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: X, T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String>)), <X>T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String>
-+T6638712e.java:17:27: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: X, T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String>)), <X>T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String>
- 1 error
diff -r 0e26048bb9e3 -r faaea522af93 patches/jtreg-T6650759m-fix.patch
--- a/patches/jtreg-T6650759m-fix.patch Tue Jul 29 01:20:12 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
---- openjdk-old/langtools/test/tools/javac/generics/inference/6650759/T6650759m.out 2010-12-03 16:08:35.000000000 +0100
-+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759m.out 2010-12-03 16:12:08.000000000 +0100
-@@ -1,2 +1,2 @@
--T6650759m.java:43:36: compiler.err.prob.found.req: (compiler.misc.incompatible.types), java.util.List<? super java.lang.Integer>, java.util.List<? super java.lang.String>
-+T6650759m.java:43:36: compiler.err.prob.found.req: (- compiler.misc.incompatible.types), java.util.List<? super java.lang.Integer>, java.util.List<? super java.lang.String>
- 1 error
diff -r 0e26048bb9e3 -r faaea522af93 patches/openjdk/6636370-appcontext_simplification.patch
--- a/patches/openjdk/6636370-appcontext_simplification.patch Tue Jul 29 01:20:12 2014 +0100
+++ b/patches/openjdk/6636370-appcontext_simplification.patch Wed Jul 30 14:41:18 2014 +0100
@@ -1,6 +1,6 @@
diff -Nru openjdk.orig/jdk/src/share/classes/sun/awt/AppContext.java openjdk/jdk/src/share/classes/sun/awt/AppContext.java
---- openjdk.orig/jdk/src/share/classes/sun/awt/AppContext.java 2013-08-05 16:49:37.120128300 +0100
-+++ openjdk/jdk/src/share/classes/sun/awt/AppContext.java 2013-08-05 17:02:51.304664462 +0100
+--- openjdk.orig/jdk/src/share/classes/sun/awt/AppContext.java 2014-07-30 05:35:13.829679786 +0100
++++ openjdk/jdk/src/share/classes/sun/awt/AppContext.java 2014-07-30 05:41:13.086698718 +0100
@@ -151,7 +151,7 @@
contained in another AppContext. It is implicitly created for
standalone apps only (i.e. not applets)
@@ -71,58 +71,17 @@
// Special case: we implicitly create the main app context
// if no contexts have been created yet. This covers standalone apps
-@@ -308,28 +297,29 @@
- }
- }
+@@ -338,8 +327,7 @@
+ }
-- AppContext context = threadGroup2appContext.get(threadGroup);
-- while (context == null) {
-- threadGroup = threadGroup.getParent();
-- if (threadGroup == null) {
-- return null;
-+ AppContext context = threadGroup2appContext.get(threadGroup);
-+ while (context == null) {
-+ threadGroup = threadGroup.getParent();
-+ if (threadGroup == null) {
-+ return null;
-+ }
-+ context = threadGroup2appContext.get(threadGroup);
-+ }
-+
-+ // In case we did anything in the above while loop, we add
-+ // all the intermediate ThreadGroups to threadGroup2appContext
-+ // so we won't spin again.
-+ for (ThreadGroup tg = currentThreadGroup; tg != threadGroup; tg = tg.getParent()) {
-+ threadGroup2appContext.put(tg, context);
-+ }
-+
-+ // Now we're done, so we cache the latest key/value pair.
-+ threadAppContext.set(context);
-+
-+
-+ return context;
- }
-- context = threadGroup2appContext.get(threadGroup);
-- }
-- // In case we did anything in the above while loop, we add
-- // all the intermediate ThreadGroups to threadGroup2appContext
-- // so we won't spin again.
-- for (ThreadGroup tg = currentThreadGroup; tg != threadGroup; tg = tg.getParent()) {
-- threadGroup2appContext.put(tg, context);
-- }
--
-- // Now we're done, so we cache the latest key/value pair.
+ // Now we're done, so we cache the latest key/value pair.
- mostRecentThreadAppContext =
- new MostRecentThreadAppContext(currentThread, context);
--
-- return context;
-- }
-- });
-+ });
- }
++ threadAppContext.set(context);
- return appContext;
-@@ -473,7 +463,7 @@
+ return context;
+ }
+@@ -487,7 +475,7 @@
// Threads in the ThreadGroup to exit.
long startTime = System.currentTimeMillis();
@@ -131,7 +90,7 @@
while ((this.threadGroup.activeCount() > 0) &&
(System.currentTimeMillis() < endTime)) {
try {
-@@ -488,7 +478,7 @@
+@@ -502,7 +490,7 @@
// Threads in the ThreadGroup to die.
startTime = System.currentTimeMillis();
@@ -140,7 +99,7 @@
while ((this.threadGroup.activeCount() > 0) &&
(System.currentTimeMillis() < endTime)) {
try {
-@@ -507,10 +497,7 @@
+@@ -521,10 +509,7 @@
}
threadGroup2appContext.remove(this.threadGroup);
@@ -152,15 +111,7 @@
// Finally, we destroy the ThreadGroup entirely.
try {
-@@ -693,6 +680,7 @@
- * Returns a string representation of this AppContext.
- * @since 1.2
- */
-+ @Override
- public String toString() {
- return getClass().getName() + "[threadGroup=" + threadGroup.getName() + "]";
- }
-@@ -842,15 +830,6 @@
+@@ -856,15 +842,6 @@
}
}
diff -r 0e26048bb9e3 -r faaea522af93 patches/openjdk/6638712-wildcard_types.patch
--- a/patches/openjdk/6638712-wildcard_types.patch Tue Jul 29 01:20:12 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,563 +0,0 @@
-# HG changeset patch
-# User mcimadamore
-# Date 1284137253 -3600
-# Node ID c5fe15e03287286fa8e668798409c4d7493ee834
-# Parent 27f03394a69d018c1c2badadee65ea39c7274606
-6638712: Inference with wildcard types causes selection of inapplicable method
-Summary: Added global sanity check in order to make sure that return type inference does not violate bounds constraints
-Reviewed-by: jjg
-
-diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/code/Type.java
---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/code/Type.java Wed Jun 23 16:44:15 2010 -0700
-+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/code/Type.java Fri Sep 10 17:47:33 2010 +0100
-@@ -1061,6 +1061,21 @@
- return qtype.isErroneous();
- }
-
-+ /**
-+ * Replaces this ForAll's typevars with a set of concrete Java types
-+ * and returns the instantiated generic type. Subclasses might override
-+ * in order to check that the list of types is a valid instantiation
-+ * of the ForAll's typevars.
-+ *
-+ * @param actuals list of actual types
-+ * @param types types instance
-+ * @return qtype where all occurrences of tvars are replaced
-+ * by types in actuals
-+ */
-+ public Type inst(List<Type> actuals, Types types) {
-+ return types.subst(qtype, tvars, actuals);
-+ }
-+
- public Type map(Mapping f) {
- return f.apply(qtype);
- }
-diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/code/Types.java
---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Wed Jun 23 16:44:15 2010 -0700
-+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Fri Sep 10 17:47:33 2010 +0100
-@@ -331,6 +331,14 @@
- if (s.tag >= firstPartialTag)
- return isSuperType(s, t);
-
-+ if (s.isCompound()) {
-+ for (Type s2 : interfaces(s).prepend(supertype(s))) {
-+ if (!isSubtype(t, s2, capture))
-+ return false;
-+ }
-+ return true;
-+ }
-+
- Type lower = lowerBound(s);
- if (s != lower)
- return isSubtype(capture ? capture(t) : t, lower, false);
-@@ -2766,6 +2774,14 @@
- /**
- * Capture conversion as specified by JLS 3rd Ed.
- */
-+
-+ public List<Type> capture(List<Type> ts) {
-+ List<Type> buf = List.nil();
-+ for (Type t : ts) {
-+ buf = buf.prepend(capture(t));
-+ }
-+ return buf.reverse();
-+ }
- public Type capture(Type t) {
- if (t.tag != CLASS)
- return t;
-diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/comp/Check.java
---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Wed Jun 23 16:44:15 2010 -0700
-+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Fri Sep 10 17:47:33 2010 +0100
-@@ -383,6 +383,10 @@
- JCDiagnostic.fragment("incompatible.types" + (d!=null ? ".1" : ""), d),
- t, pt);
- }
-+ } catch (Infer.InvalidInstanceException ex) {
-+ JCDiagnostic d = ex.getDiagnostic();
-+ log.error(pos, "invalid.inferred.types", t.tvars, d);
-+ return syms.errType;
- }
- }
- }
-diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/comp/Infer.java
---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java Wed Jun 23 16:44:15 2010 -0700
-+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java Fri Sep 10 17:47:33 2010 +0100
-@@ -29,6 +29,7 @@
- import com.sun.tools.javac.util.List;
- import com.sun.tools.javac.code.*;
- import com.sun.tools.javac.code.Type.*;
-+import com.sun.tools.javac.code.Symbol.*;
-
- import static com.sun.tools.javac.code.Flags.*;
- import static com.sun.tools.javac.code.Kinds.*;
-@@ -50,6 +51,7 @@
-
- Symtab syms;
- Types types;
-+ Resolve rs;
-
- public static Infer instance(Context context) {
- Infer instance = context.get(inferKey);
-@@ -62,43 +64,51 @@
- context.put(inferKey, this);
- syms = Symtab.instance(context);
- types = Types.instance(context);
-+ rs = Resolve.instance(context);
- }
-
-- public static class NoInstanceException extends RuntimeException {
-+ public static class InferenceException extends RuntimeException {
- private static final long serialVersionUID = 0;
-
-- boolean isAmbiguous; // exist several incomparable best instances?
--
- JCDiagnostic diagnostic;
-
-- NoInstanceException(boolean isAmbiguous) {
-+ InferenceException() {
- this.diagnostic = null;
-- this.isAmbiguous = isAmbiguous;
- }
-- NoInstanceException setMessage(String key) {
-- this.diagnostic = JCDiagnostic.fragment(key);
-+ InferenceException setMessage(String key, Object... args) {
-+ this.diagnostic = JCDiagnostic.fragment(key, args);
- return this;
- }
-- NoInstanceException setMessage(String key, Object arg1) {
-- this.diagnostic = JCDiagnostic.fragment(key, arg1);
-- return this;
-- }
-- NoInstanceException setMessage(String key, Object arg1, Object arg2) {
-- this.diagnostic = JCDiagnostic.fragment(key, arg1, arg2);
-- return this;
-- }
-- NoInstanceException setMessage(String key, Object arg1, Object arg2, Object arg3) {
-- this.diagnostic = JCDiagnostic.fragment(key, arg1, arg2, arg3);
-- return this;
-- }
-+
- public JCDiagnostic getDiagnostic() {
- return diagnostic;
- }
- }
-+
-+ public static class NoInstanceException extends InferenceException {
-+ private static final long serialVersionUID = 1;
-+
-+ boolean isAmbiguous; // exist several incomparable best instances?
-+
-+ NoInstanceException(boolean isAmbiguous) {
-+ super();
-+ this.isAmbiguous = isAmbiguous;
-+ }
-+ }
-+
-+ public static class InvalidInstanceException extends InferenceException {
-+ private static final long serialVersionUID = 2;
-+
-+ InvalidInstanceException() {
-+ super();
-+ }
-+ }
-+
- private final NoInstanceException ambiguousNoInstanceException =
- new NoInstanceException(true);
- private final NoInstanceException unambiguousNoInstanceException =
- new NoInstanceException(false);
-+ private final InvalidInstanceException invalidInstanceException = new InvalidInstanceException();
-
- /***************************************************************************
- * Auxiliary type values and classes
-@@ -247,7 +257,7 @@
- */
- public Type instantiateExpr(ForAll that,
- Type to,
-- Warner warn) throws NoInstanceException {
-+ Warner warn) throws InferenceException {
- List<Type> undetvars = Type.map(that.tvars, fromTypeVarFun);
- for (List<Type> l = undetvars; l.nonEmpty(); l = l.tail) {
- UndetVar v = (UndetVar) l.head;
-@@ -273,8 +283,7 @@
- List<Type> targs = Type.map(undetvars, getInstFun);
- targs = types.subst(targs, that.tvars, targs);
- checkWithinBounds(that.tvars, targs, warn);
--
-- return getInstFun.apply(qtype1);
-+ return that.inst(targs, types);
- }
-
- /** Instantiate method type `mt' by finding instantiations of
-@@ -282,36 +291,42 @@
- */
- public Type instantiateMethod(List<Type> tvars,
- MethodType mt,
-- List<Type> argtypes,
-- boolean allowBoxing,
-- boolean useVarargs,
-- Warner warn) throws NoInstanceException {
-+ final List<Type> argtypes,
-+ final boolean allowBoxing,
-+ final boolean useVarargs,
-+ final Warner warn) throws InferenceException {
- //-System.err.println("instantiateMethod(" + tvars + ", " + mt + ", " + argtypes + ")"); //DEBUG
- List<Type> undetvars = Type.map(tvars, fromTypeVarFun);
- List<Type> formals = mt.argtypes;
--
-+ //need to capture exactly once - otherwise subsequent
-+ //applicability checks might fail
-+ final List<Type> capturedArgs = types.capture(argtypes);
-+ List<Type> actuals = capturedArgs;
-+ List<Type> actualsNoCapture = argtypes;
- // instantiate all polymorphic argument types and
- // set up lower bounds constraints for undetvars
- Type varargsFormal = useVarargs ? formals.last() : null;
-- while (argtypes.nonEmpty() && formals.head != varargsFormal) {
-- Type ft = formals.head;
-- Type at = argtypes.head.baseType();
-- if (at.tag == FORALL)
-- at = instantiateArg((ForAll) at, ft, tvars, warn);
-- Type sft = types.subst(ft, tvars, undetvars);
-+ while (actuals.nonEmpty() && formals.head != varargsFormal) {
-+ Type formal = formals.head;
-+ Type actual = actuals.head.baseType();
-+ Type actualNoCapture = actualsNoCapture.head.baseType();
-+ if (actual.tag == FORALL)
-+ actual = instantiateArg((ForAll)actual, formal, tvars, warn);
-+ Type undetFormal = types.subst(formal, tvars, undetvars);
- boolean works = allowBoxing
-- ? types.isConvertible(at, sft, warn)
-- : types.isSubtypeUnchecked(at, sft, warn);
-+ ? types.isConvertible(actual, undetFormal, warn)
-+ : types.isSubtypeUnchecked(actual, undetFormal, warn);
- if (!works) {
- throw unambiguousNoInstanceException
- .setMessage("no.conforming.assignment.exists",
-- tvars, at, ft);
-+ tvars, actualNoCapture, formal);
- }
- formals = formals.tail;
-- argtypes = argtypes.tail;
-+ actuals = actuals.tail;
-+ actualsNoCapture = actualsNoCapture.tail;
- }
- if (formals.head != varargsFormal || // not enough args
-- !useVarargs && argtypes.nonEmpty()) { // too many args
-+ !useVarargs && actuals.nonEmpty()) { // too many args
- // argument lists differ in length
- throw unambiguousNoInstanceException
- .setMessage("arg.length.mismatch");
-@@ -319,20 +334,21 @@
-
- // for varargs arguments as well
- if (useVarargs) {
-- Type elt = types.elemtype(varargsFormal);
-- Type sft = types.subst(elt, tvars, undetvars);
-- while (argtypes.nonEmpty()) {
-- Type ft = sft;
-- Type at = argtypes.head.baseType();
-- if (at.tag == FORALL)
-- at = instantiateArg((ForAll) at, ft, tvars, warn);
-- boolean works = types.isConvertible(at, sft, warn);
-+ Type elemType = types.elemtype(varargsFormal);
-+ Type elemUndet = types.subst(elemType, tvars, undetvars);
-+ while (actuals.nonEmpty()) {
-+ Type actual = actuals.head.baseType();
-+ Type actualNoCapture = actualsNoCapture.head.baseType();
-+ if (actual.tag == FORALL)
-+ actual = instantiateArg((ForAll)actual, elemType, tvars, warn);
-+ boolean works = types.isConvertible(actual, elemUndet, warn);
- if (!works) {
- throw unambiguousNoInstanceException
- .setMessage("no.conforming.assignment.exists",
-- tvars, at, ft);
-+ tvars, actualNoCapture, elemType);
- }
-- argtypes = argtypes.tail;
-+ actuals = actuals.tail;
-+ actualsNoCapture = actualsNoCapture.tail;
- }
- }
-
-@@ -363,16 +379,38 @@
More information about the distro-pkg-dev
mailing list