diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-03-06 13:41:02 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-03-07 13:55:38 +0100 |
commit | eb4a2e3343c9ee0ceaa249fc36b257dd6c13edf3 (patch) | |
tree | a0a36dc9289fae5f5b5955b905c44aae893ff7da /test/files | |
parent | 2dddb03b267770afcd0249ad700e55d53019e637 (diff) | |
download | scala-eb4a2e3343c9ee0ceaa249fc36b257dd6c13edf3.tar.gz scala-eb4a2e3343c9ee0ceaa249fc36b257dd6c13edf3.tar.bz2 scala-eb4a2e3343c9ee0ceaa249fc36b257dd6c13edf3.zip |
SI-8364 fixes cxTree lookup for imports
This is reminiscent of the bug that I recently fixed in paradise:
https://github.com/scalamacros/paradise/commit/0dc4e35883d357b7cbcdfd83b5b4821c1dcc0bb1.
When doing something non-standard with contexts, we usually have to keep
in mind that new contexts are created not only for trees that demarcate
blocks of code, but also for imports.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/t8364.check | 0 | ||||
-rw-r--r-- | test/files/pos/t8364.scala | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/t8364.check b/test/files/pos/t8364.check new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/files/pos/t8364.check diff --git a/test/files/pos/t8364.scala b/test/files/pos/t8364.scala new file mode 100644 index 0000000000..7a7ea1ff12 --- /dev/null +++ b/test/files/pos/t8364.scala @@ -0,0 +1,12 @@ +import scala.language.dynamics + +object MyDynamic extends Dynamic { + def selectDynamic(name: String): Any = ??? +} + +object Test extends App { + locally { + import java.lang.String + MyDynamic.id + } +} |