aboutsummaryrefslogtreecommitdiff
path: root/test/x/cakes.scala
blob: ff5e5d64f72ac015dffcc489e02bd85380323d3e (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package test

trait API {

  type Name >: Null <: NameAPI
  type Symbol >: Null <: SymbolAPI
  type ScopeEntry >: Null <: ScopeEntryAPI

  class NameAPI
  class SymbolAPI
  class ScopeEntryAPI

}

trait Names { self: SymTab =>

  class Name extends NameAPI

}

trait Symbols { self: SymTab =>

  class Symbol extends SymbolAPI

}

trait Scopes { self: SymTab =>

  class ScopeEntry extends ScopeEntryAPI
  class Scope {
    def unlink(e: ScopeEntry): Unit = ???
    def unlink(e: Symbol): Unit = ???
  }

}

trait SymTab extends API with Names with Scopes {

}


trait SyncOps extends SymTab {

  trait SyncScope extends Scope {
    override def unlink(e: ScopeEntry): Unit = ???
    override def unlink(e: Symbol): Unit = ???
  }

}