diff options
author | Martin Odersky <odersky@gmail.com> | 2003-09-07 17:54:44 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-09-07 17:54:44 +0000 |
commit | 70d78cbfc802ccc49d5d324755865ff07985dfef (patch) | |
tree | bc524a99cc8d3f6a5a722a60d98aacbd06f9c92b /sources/scalac/typechecker/Infer.java | |
parent | 43c5c82eb9ee00e7d87042a1195d854f4ac79df3 (diff) | |
download | scala-70d78cbfc802ccc49d5d324755865ff07985dfef.tar.gz scala-70d78cbfc802ccc49d5d324755865ff07985dfef.tar.bz2 scala-70d78cbfc802ccc49d5d324755865ff07985dfef.zip |
*** empty log message ***
Diffstat (limited to 'sources/scalac/typechecker/Infer.java')
-rw-r--r-- | sources/scalac/typechecker/Infer.java | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/sources/scalac/typechecker/Infer.java b/sources/scalac/typechecker/Infer.java index c14515f841..5dcf9bf0db 100644 --- a/sources/scalac/typechecker/Infer.java +++ b/sources/scalac/typechecker/Infer.java @@ -65,23 +65,6 @@ public class Infer implements Modifiers, Kinds { (sym == null ? "expression" : sym) + " of type " + tp; } -// Helper definitions --------------------------------------------------------- - - /** Is type `tp' a polymorphic method type? - */ - private boolean isPolymorphic(Type tp) { - return tp.typeParams().length > 0; - } - - /** Is type `tp' a parameterized method type? - */ - boolean isParameterized(Type tp) { - switch (tp) { - case MethodType(_, _): return true; - default: return isPolymorphic(tp); - } - } - // Tree Substitution ------------------------------------------------------------- static class Substituter extends Transformer { @@ -954,8 +937,8 @@ public class Infer implements Modifiers, Kinds { } //where private boolean improves(Type tp1, Type tp2) { - return isParameterized(tp2) && - (!isParameterized(tp1) || specializes(tp1, tp2)); + return tp2.isParameterized() && + (!tp1.isParameterized() || specializes(tp1, tp2)); } /** Assign `tree' the type of an alternative |