You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala>traitT {
deff:Int
}
defined traitT
scala>
scala>classA(f: Int) extendsT
defined classA
scala>newA(1)
res0:A=A@ca263c2
scala> res0.f
java.lang.AbstractMethodError:MethodA.f()I is abstract
at A.f(<console>)
at .<init>(<console>:8)
at .<clinit>(<console>)
at RequestResult$.<init>(<console>:3)
at RequestResult$.<clinit>(<console>)
at RequestResult$result(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Private members do not override abstract ones. So when looking for
abstract members we need to search with `nonPrivateMember`, not
`member`.
Fixesscala#1531. Review by @smarter.
The following code compiles:
I would expect to fail with following error like it does in scalac:
error: class A needs to be abstract, since def f: => Int is not defined
The text was updated successfully, but these errors were encountered: