diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-04 13:49:45 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-03-04 13:49:50 +0100 |
commit | f196e074c41f7ccde118dcf6764898a2c26fda3a (patch) | |
tree | 7427249f21c5879dff53d9dbaf1f17736944e9fb /tests/neg | |
parent | 340ec6150b205287e1c0f5a0422d2186c29bc086 (diff) | |
download | dotty-f196e074c41f7ccde118dcf6764898a2c26fda3a.tar.gz dotty-f196e074c41f7ccde118dcf6764898a2c26fda3a.tar.bz2 dotty-f196e074c41f7ccde118dcf6764898a2c26fda3a.zip |
Fix of #39
Two fixes:
1) Avoid the infinite recursion in checkAccessible if the accessibility check fails.
2) Make accessibility succeed for the test, and in general if the target denotation does not have a symbol.
Added original test in pos and a negative test which makes accessibility fail.
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/i39.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/neg/i39.scala b/tests/neg/i39.scala new file mode 100644 index 000000000..250947df9 --- /dev/null +++ b/tests/neg/i39.scala @@ -0,0 +1,19 @@ +object i39neg { + + trait B { + type D <: { type T } + def d: D + } + + val bc: B = new B { + def d: D = ??? + private def pd: D = ??? + } + + val d: bc.D = bc.d + val pd: bc.D = bc.pd + + // infinite loop in Typer + val asT: d.T = ??? + +} |