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
The error check that is not possible to override an extension/normal
methods, because it should be as declared. Shound come before the check
that the `override` modifier is needed.
Add test case for this: 'override-extension_normal-methods'
6 | def m[T](x: T): String = "normal method" // error: normal method, cannot override an extension method. Also needs `override' modifier (but this error should be obfuscated).
3
+
| ^
4
+
| error overriding method m in trait A of type [T](t: T): String;
5
+
| method m of type [T](x: T): String is a normal method, cannot override an extension method
14 | def [T](t: T).m: String = "extrnsion method" // error: extension method, cannot override an normal method. Also needs `override' modifier (but this error should be obfuscated).
8
+
| ^
9
+
| error overriding method m in trait B of type [T](x: T): String;
10
+
| method m of type [T](t: T): String is an extension method, cannot override a normal method
defm[T](x: T):String="normal method"// error: normal method, cannot override an extension method. Also needs `override' modifier (but this error should be obfuscated).
7
+
}
8
+
9
+
traitB {
10
+
defm[T](x: T):String="normal method"
11
+
}
12
+
13
+
traitBBBextendsB {
14
+
def [T](t: T).m:String="extrnsion method"// error: extension method, cannot override an normal method. Also needs `override' modifier (but this error should be obfuscated).
0 commit comments