summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-03-28 21:37:39 -0700
committerPaul Phillips <paulp@improving.org>2013-03-28 21:38:30 -0700
commit5ddad9257162b47526ac1df9cc39c056b206377e (patch)
treed0e4a3f61a8aa78e6e46559fb3c874d0b5a86494 /test/files/pos
parentdf103faa5d5251d34a99a04f8d8b2b2786e6d3ab (diff)
parent395e90a786874ebe795e656f532b50110c8c1a98 (diff)
downloadscala-5ddad9257162b47526ac1df9cc39c056b206377e.tar.gz
scala-5ddad9257162b47526ac1df9cc39c056b206377e.tar.bz2
scala-5ddad9257162b47526ac1df9cc39c056b206377e.zip
Merge commit '395e90a786' into pr/merge-395e90a786
* commit '395e90a786': SI-7251, compiler crash with $. SI-7240 fixes language feature lookup SI-7233 Account for aliased imports in Erasure SI-7233 Account for aliased imports in eta expansion. SI-7132 - don't discard Unit type in interpreter SI-6725 `f` interpolator now supports %n tokens Conflicts: src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala src/repl/scala/tools/nsc/interpreter/ExprTyper.scala
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t7233.scala14
-rw-r--r--test/files/pos/t7233b.scala8
2 files changed, 22 insertions, 0 deletions
diff --git a/test/files/pos/t7233.scala b/test/files/pos/t7233.scala
new file mode 100644
index 0000000000..ae15c08c35
--- /dev/null
+++ b/test/files/pos/t7233.scala
@@ -0,0 +1,14 @@
+object Foo {
+ def bar(i: Int) = i
+
+ def ol(i: Int) = i
+ def ol(i: String) = i
+}
+object Test {
+ import Foo.{ bar => quux, toString => bar, ol => olRenamed}
+
+ val f1 = quux _
+ val f1Typed: (Int => Int) = f1
+
+ val f2: String => String = olRenamed _
+}
diff --git a/test/files/pos/t7233b.scala b/test/files/pos/t7233b.scala
new file mode 100644
index 0000000000..927c7fcfd1
--- /dev/null
+++ b/test/files/pos/t7233b.scala
@@ -0,0 +1,8 @@
+object Test {
+ // crash
+ def foo(a: Any) = { import a.{toString => toS}; toS }
+
+ // okay
+ def ok1(a: String) = { import a.{isInstanceOf => iio}; iio[String] }
+ def ok2(a: Int) = { import a.{toInt => ti}; ti }
+}