Closed
Description
Compiler version
3.0.1-RC1
Minimized example
class Bag extends reflect.Selectable
val m = new Bag { val f = 23; def g = 47; def h(i: Int): Int = i }
Output
in the repl the type printed has a type that is not source compatible
scala> val m = new Bag { val f = 23; def g = 47; def h(i: Int): Int = i; var i = 101; type N = Int }
val m: Bag{f: Int; g: => Int; h(i: Int): Int; i: Int; i_=(x$1: Int): Unit; N = Int} = anon$1@403364e9
Expectation
we annotate each refinement with if it is a type
, def
or val
scala> val m = new Bag { val f = 23; def g = 47; def h(i: Int): Int = i; var i = 101; type N = Int }
val m: Bag{val f: Int; def g: Int; def h(i: Int): Int; def i: Int; def i_=(x$1: Int): Unit; type N = Int} = anon$1@403364e9