diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-05-06 12:00:12 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-05-06 12:00:12 +0200 |
commit | f5df207f95087c38b2936429cf793d63f0b68c24 (patch) | |
tree | 2ab6327f993d14feac3c8356ed4f8176a42f9666 /test/files/pos/t5305.scala | |
parent | 7cac6334d4437ff54c4979799574045501f64135 (diff) | |
download | scala-f5df207f95087c38b2936429cf793d63f0b68c24.tar.gz scala-f5df207f95087c38b2936429cf793d63f0b68c24.tar.bz2 scala-f5df207f95087c38b2936429cf793d63f0b68c24.zip |
Don't hop to the first enclosing, non-silent context when typing refinements.
Closes SI-5305.
This reverts a few lines of e5cfe47a19, which was a remedy for SI-3614 and SI-3856*. I added a test case for the former, the
latter was already tested. Both tests pass after this change, and they do so with the old and new pattern matcher.
But does this change still "avoid trees with null types in presentation compiler"? What was the intent of the context hopping in the first place?
* Based on this comment: https://issues.scala-lang.org/browse/SI-3614?focusedCommentId=50477&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50477, which elaborates further than the commit comment of e5cfe47a19.
Diffstat (limited to 'test/files/pos/t5305.scala')
-rw-r--r-- | test/files/pos/t5305.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/pos/t5305.scala b/test/files/pos/t5305.scala new file mode 100644 index 0000000000..4c32cd7c6d --- /dev/null +++ b/test/files/pos/t5305.scala @@ -0,0 +1,13 @@ +object t5305 { + def in(a: Any) = {} + + object O { + type F = Int + val v = "" + } + + in { + import O.{F, v} + type x = {type l = (F, v.type)} // not found: type F + } +} |