t836.scala:9: error: type mismatch; found : Any required: A.this.S (which expands to) A.this.MyObj#S val some: S = any // compiles => type X is set to scala.Any ^ one error found