blob: e5ad743aaac8f74c3057a4f4f7da90bb4683356e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
abstract class BackendInterface {
type Symbol >: Null
type ClassDef >: Null
}
class BTypesFromSymbols[I <: BackendInterface](val int: I) {
def isRemote(s: int.Symbol) = println("might've been remote")
}
trait BCodeIdiomatic {
val int: BackendInterface
final lazy val bTypes = new BTypesFromSymbols[int.type](int)
}
trait BCodeSkelBuilder extends BCodeIdiomatic {
import int._
import bTypes._
val b: BTypesFromSymbols[int.type] = bTypes
val x: int.type = bTypes.int
val y: bTypes.int.type = int
def getPlainClass(cd: ClassDef) = bTypes.isRemote(null: Symbol)
}
|