diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-01-13 11:05:24 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-01-13 11:05:24 +0000 |
commit | 895280684fc63f56f5822114118b3275dac7ec5c (patch) | |
tree | 91e7f365725c69422fe6a431c2eedabd5f62cc57 /src | |
parent | 2664de4710f64a5e0fb753ad7b23987d46625c63 (diff) | |
download | scala-895280684fc63f56f5822114118b3275dac7ec5c.tar.gz scala-895280684fc63f56f5822114118b3275dac7ec5c.tar.bz2 scala-895280684fc63f56f5822114118b3275dac7ec5c.zip |
When comparing type aliases use info instead of...
When comparing type aliases use info instead of tpe so that the changes
are correctly detected. Fixes #2650. No review.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/dependencies/Changes.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/dependencies/Changes.scala b/src/compiler/scala/tools/nsc/dependencies/Changes.scala index db0567993b..a69d4b3e86 100644 --- a/src/compiler/scala/tools/nsc/dependencies/Changes.scala +++ b/src/compiler/scala/tools/nsc/dependencies/Changes.scala @@ -166,7 +166,13 @@ abstract class Changes { else if (n == NoSymbol) cs += Removed(toEntity(o)) else { - val newSym = n.suchThat(ov => sameType(ov.tpe, o.tpe)) + val newSym = + o match { + case _:TypeSymbol if o.isAliasType => + n.suchThat(ov => sameType(ov.info, o.info)) + case _ => + n.suchThat(ov => sameType(ov.tpe, o.tpe)) + } if (newSym == NoSymbol || moreRestrictive(o.flags, newSym.flags)) cs += Changed(toEntity(o))(n + " changed from " + o.tpe + " to " + n.tpe + " flags: " + Flags.flagsToString(o.flags)) else |