diff options
author | Shixiong Zhu <zsxwing@gmail.com> | 2016-05-11 12:53:21 -0700 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-05-11 21:53:21 +0200 |
commit | 1de4fff089eaa6b280652dc8183a57162a8f2ad2 (patch) | |
tree | df71ecf1eecd5c9ef1f4a78f681440618015def2 /test | |
parent | fec54d6bb437280e74e4ec0286e42ae757b9b691 (diff) | |
download | scala-1de4fff089eaa6b280652dc8183a57162a8f2ad2.tar.gz scala-1de4fff089eaa6b280652dc8183a57162a8f2ad2.tar.bz2 scala-1de4fff089eaa6b280652dc8183a57162a8f2ad2.zip |
SI-9397 Add "_root_" to "GenUtils.scalaFactoryCall" to avoid the scala package name conflits (#5150)
When a user imports some package ending with `scala`, the macro expansion of TypeTag may not work because it uses `scala.collection.immutable.List` but it's overrided. This patch adds the `_root_` prefix to avoid the scala package name conflits. Of cause, after this fix, importing a package ending with `_root_` has the same issue. However, people rarely do that.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t9397.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/t9397.scala b/test/files/pos/t9397.scala new file mode 100644 index 0000000000..3dbc6591d3 --- /dev/null +++ b/test/files/pos/t9397.scala @@ -0,0 +1,12 @@ +package foo.scala + +import scala.reflect.runtime.universe._ + +object Foo { + + def bar[T: TypeTag]() { + } + + import foo._ + bar[String]() +} |