1
Type in expressions to have them evaluated.
2
Type :help for more information.
5
** Power User mode enabled - BEEP WHIR GYVE **
6
** :phase has been set to 'typer'. **
7
** scala.tools.nsc._ has been imported **
8
** global._, definitions._ also imported **
9
** Try :help, :vals, power.<tab> **
11
scala> val u = rootMirror.universe
12
u: $r.intp.global.type = <global>
14
scala> import u._, scala.reflect.internal.Flags
16
import scala.reflect.internal.Flags
21
scala> val sym = u.typeOf[C].typeSymbol
22
sym: u.Symbol = class C
24
scala> sym.isContravariant
27
scala> sym setFlag Flags.INCONSTRUCTOR
28
res1: sym.type = class C
30
scala> sym.isClassLocalToConstructor
33
scala> sym.isContravariant // was true