summaryrefslogtreecommitdiff
path: root/test/files/neg/t7046/Test_2.scala
blob: fcb3e46a0f48122cf04a7309258a6acdc4fe4428 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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)

object Enigma {
  locally {
    // local class not seen
    class Local extends Foo
  }

  def foo: Unit = {
    // local class not seen
    class Riddle extends Foo
  }
}