abeln / dotty

Scala with explicit nulls
https://github.com/abeln/dotty/wiki/scala-with-explicit-nulls
Other
23 stars 2 forks source link

runtime dynamic proxies #10

Closed dsilvasc closed 6 years ago

dsilvasc commented 6 years ago

Related to https://github.com/abeln/dotty/issues/9

trait Demo {
  def m: String
}

val d: Demo = Mockito.mock(classOf[Demo])
val str = d.m  // method m is unmocked, so Mockito returns null for it
println(str.length)  // compile error or runtime null pointer exception?
abeln commented 6 years ago

Same as #9: will probably be a runtime NPE.