diff options
4 files changed, 15 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]) { diff --git a/test/files/buildmanager/annotated/A.scala b/test/files/buildmanager/annotated/A.scala new file mode 100644 index 0000000000..4130cf21ec --- /dev/null +++ b/test/files/buildmanager/annotated/A.scala @@ -0,0 +1 @@ +case class A[T](x: String, y: T) diff --git a/test/files/buildmanager/annotated/annotated.check b/test/files/buildmanager/annotated/annotated.check new file mode 100644 index 0000000000..ce92c9a294 --- /dev/null +++ b/test/files/buildmanager/annotated/annotated.check @@ -0,0 +1,6 @@ +builder > A.scala +compiling Set(A.scala) +Changes: Map() +builder > A.scala +compiling Set(A.scala) +Changes: Map(class A -> List(), object A -> List()) diff --git a/test/files/buildmanager/annotated/annotated.test b/test/files/buildmanager/annotated/annotated.test new file mode 100644 index 0000000000..392e0d365f --- /dev/null +++ b/test/files/buildmanager/annotated/annotated.test @@ -0,0 +1,2 @@ +>>compile A.scala +>>compile A.scala |