summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorShixiong Zhu <zsxwing@gmail.com>2016-05-11 12:53:21 -0700
committerLukas Rytz <lukas.rytz@typesafe.com>2016-05-11 21:53:21 +0200
commit1de4fff089eaa6b280652dc8183a57162a8f2ad2 (patch)
treedf71ecf1eecd5c9ef1f4a78f681440618015def2 /test/files/pos
parentfec54d6bb437280e74e4ec0286e42ae757b9b691 (diff)
downloadscala-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/files/pos')
-rw-r--r--test/files/pos/t9397.scala12
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]()
+}