summaryrefslogtreecommitdiff
path: root/test/files/run/t7046-1/Test_2.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t7046-1/Test_2.scala')
-rw-r--r--test/files/run/t7046-1/Test_2.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/files/run/t7046-1/Test_2.scala b/test/files/run/t7046-1/Test_2.scala
new file mode 100644
index 0000000000..28459fde72
--- /dev/null
+++ b/test/files/run/t7046-1/Test_2.scala
@@ -0,0 +1,23 @@
+object Test extends App {
+ val subs = Macros.knownDirectSubclasses[Foo]
+ assert(subs == List("Wibble", "Wobble", "Bar", "Baz"))
+}
+
+sealed trait Foo
+object Foo {
+ trait Wibble extends Foo
+ case object Wobble extends Foo
+}
+
+trait Bar extends Foo
+
+object Blah {
+ type Quux = Foo
+}
+
+import Blah._
+
+trait Baz extends Quux
+
+class Boz[T](t: T)
+class Unrelated extends Boz(Test.subs)