diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-02-02 14:51:03 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-02-02 14:51:03 +0000 |
commit | a469bd96379a755c222ccb97d3eba610b020471c (patch) | |
tree | e2eaeeff6161256aadfae5344eea40daed532aad /src | |
parent | 5df06dc8dafef7f76b6783e7a473f30678c55d58 (diff) | |
download | scala-a469bd96379a755c222ccb97d3eba610b020471c.tar.gz scala-a469bd96379a755c222ccb97d3eba610b020471c.tar.bz2 scala-a469bd96379a755c222ccb97d3eba610b020471c.zip |
Correctly check annotated types.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/dependencies/Changes.scala | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/dependencies/Changes.scala b/src/compiler/scala/tools/nsc/dependencies/Changes.scala index a1250dc40f..2486c71acb 100644 --- a/src/compiler/scala/tools/nsc/dependencies/Changes.scala +++ b/src/compiler/scala/tools/nsc/dependencies/Changes.scala @@ -97,14 +97,12 @@ abstract class Changes { } } sameTypes(parents1, parents2) && isSubScope(ref1, ref2) && isSubScope(ref2, ref1) - case (mt1 @ MethodType(params1, res1), mt2 @ MethodType(params2, res2)) => // new dependent types: probably fix this, use substSym as done for PolyType - (sameTypes(tp1.paramTypes, tp2.paramTypes) && + sameTypes(tp1.paramTypes, tp2.paramTypes) && (tp1.params corresponds tp2.params)((t1, t2) => sameSymbol(t1, t2) && sameFlags(t1, t2)) && sameType(res1, res2) && - mt1.isImplicit == mt2.isImplicit) - + mt1.isImplicit == mt2.isImplicit case (PolyType(tparams1, res1), PolyType(tparams2, res2)) => sameTypeParams(tparams1, tparams2) && sameType(res1, res2) case (ExistentialType(tparams1, res1), ExistentialType(tparams2, res2)) => @@ -115,12 +113,12 @@ abstract class Changes { bounds containsType tp2 case (_, BoundedWildcardType(bounds)) => bounds containsType tp1 - case (AnnotatedType(_,_,_), _) => - annotationsConform(tp1, tp2) && annotationsConform(tp2, tp1) && tp1.withoutAnnotations =:= tp2.withoutAnnotations + annotationsConform(tp1, tp2) && annotationsConform(tp2, tp1) && + sameType(tp1.withoutAnnotations, tp2.withoutAnnotations) case (_, AnnotatedType(_,_,_)) => - annotationsConform(tp1, tp2) && annotationsConform(tp2, tp1) && tp1.withoutAnnotations =:= tp2.withoutAnnotations - + annotationsConform(tp1, tp2) && annotationsConform(tp2, tp1) && + sameType(tp1.withoutAnnotations, tp2.withoutAnnotations) case (_: SingletonType, _: SingletonType) => var origin1 = tp1 while (origin1.underlying.isInstanceOf[SingletonType]) { |