summaryrefslogtreecommitdiff
path: root/test/files/neg/t7046-2/Test_2.scala
diff options
context:
space:
mode:
authorMiles Sabin <miles@milessabin.com>2016-08-10 09:30:49 +0100
committerMiles Sabin <miles@milessabin.com>2016-08-15 18:32:45 +0100
commitd171b2cc16cc129e0f3aa03c3df9b2fb86208aa6 (patch)
treed95c542dddf2ae9e8c12843cd1b6478a7e5ad2c6 /test/files/neg/t7046-2/Test_2.scala
parent81a67eeacc7d2622ee364a21203b227142e2043e (diff)
downloadscala-d171b2cc16cc129e0f3aa03c3df9b2fb86208aa6.tar.gz
scala-d171b2cc16cc129e0f3aa03c3df9b2fb86208aa6.tar.bz2
scala-d171b2cc16cc129e0f3aa03c3df9b2fb86208aa6.zip
Partial fix for SI-7046
Diffstat (limited to 'test/files/neg/t7046-2/Test_2.scala')
-rw-r--r--test/files/neg/t7046-2/Test_2.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/neg/t7046-2/Test_2.scala b/test/files/neg/t7046-2/Test_2.scala
new file mode 100644
index 0000000000..18a2ebcbc2
--- /dev/null
+++ b/test/files/neg/t7046-2/Test_2.scala
@@ -0,0 +1,14 @@
+object Test extends App {
+ def nested: Unit = {
+ val subs = Macros.knownDirectSubclasses[Foo]
+ assert(subs == List("Bar", "Baz"))
+
+ sealed trait Foo
+ object Foo {
+ trait Bar extends Foo
+ trait Baz extends Foo
+ }
+ }
+
+ nested
+}