aboutsummaryrefslogtreecommitdiff
path: root/tests/run/structural.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/structural.scala')
-rw-r--r--tests/run/structural.scala25
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/run/structural.scala b/tests/run/structural.scala
deleted file mode 100644
index 0f18f4579..000000000
--- a/tests/run/structural.scala
+++ /dev/null
@@ -1,25 +0,0 @@
-case class Record(elems: (String, Any)*) extends Selectable {
- def selectDynamic(name: String): Any = elems.find(_._1 == name).get._2
-}
-
-object Test {
- import scala.reflect.Selectable.reflectiveSelectable
-
- def f(closeable: { def close(): Unit }) =
- closeable.close()
-
- type RN = Record { val name: String; val age: Int }
-
- def g(r: RN) = r.name
-
- val rr: RN = Record("name" -> "Bob", "age" -> 42).asInstanceOf[RN]
-
- def main(args: Array[String]): Unit = {
- f(new java.io.PrintStream("foo"))
- assert(g(rr) == "Bob")
-
- val s: { def concat(s: String): String } = "abc"
- assert(s.concat("def") == "abcdef")
- }
-}
-