summaryrefslogtreecommitdiff
path: root/src/compiler/scala/reflect/internal/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-01-04 07:05:19 +0100
committerPaul Phillips <paulp@improving.org>2012-01-04 06:24:23 -0800
commit6975b4888da9b56e2c06d45da8f483f2e33a102b (patch)
treeb4fa395843b6c573f584481848f37ee1c0ba5c68 /src/compiler/scala/reflect/internal/Types.scala
parentd188f6fdded6fdd9df3960d6085b9b80046c05ca (diff)
downloadscala-6975b4888da9b56e2c06d45da8f483f2e33a102b.tar.gz
scala-6975b4888da9b56e2c06d45da8f483f2e33a102b.tar.bz2
scala-6975b4888da9b56e2c06d45da8f483f2e33a102b.zip
Closes SI-5354.
The reason why the test case compiled without error is pretty devious: When checking the `Foo.x' implicit, a CyclicReference error occurs which causes the alternative to be discarded. Why a CylicReference? Because the inferencer tries to decide whether the owner of `z` is a subclass of the owner od `x`. To do this, it computed the info of the owner of `z1`, which is not complete because no result type for `f1` was given. Hence a CyclicReference error. The fix is twofold: (1) We make isNonBottomSubClass smarter so that it always returns false if the symbol in question is not a type; hence the info need not be computed. (2) It's dubious to swallow CyclicReference errors anywhere, but I deemed it too risky to propagate them. But at least the CyclicReference is now logged if -Ylog-implicit is true. This hopefully spares future maintainers the same detective work I had to go through when digging this out.
Diffstat (limited to 'src/compiler/scala/reflect/internal/Types.scala')
0 files changed, 0 insertions, 0 deletions