summaryrefslogtreecommitdiff
path: root/sources/scalac/typechecker/Infer.java
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scalac/typechecker/Infer.java')
-rw-r--r--sources/scalac/typechecker/Infer.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/scalac/typechecker/Infer.java b/sources/scalac/typechecker/Infer.java
index ac9da5b7df..d6bfe57384 100644
--- a/sources/scalac/typechecker/Infer.java
+++ b/sources/scalac/typechecker/Infer.java
@@ -548,12 +548,17 @@ public class Infer implements Modifiers, Kinds {
for (int i = 0; i < argtypes.length; i++) {
if (!isCompatible(argtypes[i].subst(tparams, tvars),
formals[i].subst(tparams, tvars))) {
- if (needToSucceed)
+ if (needToSucceed) {
+ Type.debugSwitch = true;
+ argtypes[i].subst(tparams, tvars).isSubType(
+ formals[i].subst(tparams, tvars));
+ Type.debugSwitch = false;
throw new NoInstance(
typeErrorMsg(
"argument expression's type is not compatible with formal parameter type",
argtypes[i].subst(tparams, tvars),
formals[i].subst(tparams, tvars)));
+ }
return null;
}
}
@@ -564,6 +569,7 @@ public class Infer implements Modifiers, Kinds {
? Type.NoType
: instantiate(tvars[i]);
}
+ //System.out.println(" = " + ArrayApply.toString(targs));//DEBUG
return targs;
}