diff options
6 files changed, 33 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala b/src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala index 58ff10948f..2aaab33dc3 100644 --- a/src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala +++ b/src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala @@ -203,7 +203,10 @@ trait DependencyAnalysis extends SubComponent with Files { for (s <- t.params) checkType(s.tpe) case t: TypeRef => - if (t.sym.isAliasType) updateReferences(t.typeSymbolDirect.fullNameString) + if (t.sym.isAliasType) { + updateReferences(t.typeSymbolDirect.fullNameString) + checkType(t.typeSymbolDirect.info) + } updateReferences(t.typeSymbol.fullNameString) for (tp <- t.args) checkType(tp) diff --git a/test/files/buildmanager/t2650_4/A.scala b/test/files/buildmanager/t2650_4/A.scala new file mode 100644 index 0000000000..b9a519eb48 --- /dev/null +++ b/test/files/buildmanager/t2650_4/A.scala @@ -0,0 +1,5 @@ +trait A { + type T = Int + type T2 = T + def x: T2 +} diff --git a/test/files/buildmanager/t2650_4/B.scala b/test/files/buildmanager/t2650_4/B.scala new file mode 100644 index 0000000000..46a8cf270a --- /dev/null +++ b/test/files/buildmanager/t2650_4/B.scala @@ -0,0 +1,3 @@ +object B { + def x(a: A): Int = a.x +} diff --git a/test/files/buildmanager/t2650_4/t2650_4.changes/A2.scala b/test/files/buildmanager/t2650_4/t2650_4.changes/A2.scala new file mode 100644 index 0000000000..0220e7b7bc --- /dev/null +++ b/test/files/buildmanager/t2650_4/t2650_4.changes/A2.scala @@ -0,0 +1,5 @@ +trait A { + type T = Long + type T2 = T + def x: T2 +} diff --git a/test/files/buildmanager/t2650_4/t2650_4.check b/test/files/buildmanager/t2650_4/t2650_4.check new file mode 100644 index 0000000000..ba092d013f --- /dev/null +++ b/test/files/buildmanager/t2650_4/t2650_4.check @@ -0,0 +1,13 @@ +builder > A.scala B.scala +compiling Set(A.scala, B.scala) +Changes: Map() +builder > A.scala +compiling Set(A.scala) +Changes: Map(trait A -> List(Changed(Definition(A.T))[type T changed from A.this.T to A.this.T flags: ])) +invalidate B.scala because it references changed definition [Changed(Definition(A.T))[type T changed from A.this.T to A.this.T flags: ]] +compiling Set(B.scala) +B.scala:2: error: type mismatch; + found : a.T2 + required: Int + def x(a: A): Int = a.x + ^ diff --git a/test/files/buildmanager/t2650_4/t2650_4.test b/test/files/buildmanager/t2650_4/t2650_4.test new file mode 100644 index 0000000000..6f3bd03361 --- /dev/null +++ b/test/files/buildmanager/t2650_4/t2650_4.test @@ -0,0 +1,3 @@ +>>compile A.scala B.scala +>>update A.scala=>A2.scala +>>compile A.scala |