diff options
author | Paul Phillips <paulp@improving.org> | 2013-09-09 12:25:26 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-09-09 12:53:32 -0700 |
commit | 288b12e48af3222134f3985b65e40f202af81df2 (patch) | |
tree | 87dedc0c05be446bf8ad76f1aa760af13ed145bb /src/reflect | |
parent | f342445f68654c1606871b5d7372621558731f65 (diff) | |
download | scala-288b12e48af3222134f3985b65e40f202af81df2.tar.gz scala-288b12e48af3222134f3985b65e40f202af81df2.tar.bz2 scala-288b12e48af3222134f3985b65e40f202af81df2.zip |
Noise reduction + minor enhance in TreeCheckers.
Misc irrelevant work, which I can only offer as-is. It lowers
the noise in -Ycheck:* output and performs some common sense
chillaxes like not screaming ERROR IN INTERNAL CHECKING! WE'RE
ALL GOING TO DIE! when a tree doesn't hit all nine points at
the Jiffy Tree.
You can see some reasonably well reduced symbol flailing if
you run the included pending tests:
test/partest --show-diff test/pending/pos/treecheckers
Example output,
Out of scope symbol reference {
tree TypeTree Factory[Traversable]
position OffsetPosition test/pending/pos/treecheckers/c5.scala:3
with sym ClassSymbol Factory: Factory[CC]
and tpe ClassArgsTypeRef Factory[Traversable]
encl(1) ModuleSymbol object Test5
ref to AbstractTypeSymbol X (<deferred> <param>)
}
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/Types.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index 9c66dc476f..ca01a4b8e3 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/src/reflect/scala/reflect/internal/Types.scala @@ -4036,12 +4036,13 @@ trait Types def isConstantType(tp: Type) = tp match { case ConstantType(_) => true - case _ => false + case _ => false } - def isExistentialType(tp: Type): Boolean = tp.dealias match { - case ExistentialType(_, _) => true - case _ => false + def isExistentialType(tp: Type): Boolean = tp match { + case _: ExistentialType => true + case tp: Type if tp.dealias ne tp => isExistentialType(tp.dealias) + case _ => false } def isImplicitMethodType(tp: Type) = tp match { |