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
[error] --Error:/home/score/varargs-overloading/src/main/scala/impl.scala:1:6--------
[error] 1|classImplextendsIntf {
[error] |^
[error] |classImpl needs to be abstract, since defthing(y: Array[?<:String]):Unit in traitIntf is not defined
[error] |(Theclassimplements members with different types: List(overridedefthing(y: Seq[String]):Nothing in classImpl, overridedefthing(x: Int):Unit in classImpl)%
[error] |%)
[error] -- [E038] DeclarationError:/home/score/varargs-overloading/src/main/scala/impl.scala:3:15
[error] 3|overridedefthing(y: String*) =???
[error] |^
[error] | method thing has a different signature than the overridden declaration
Expectation
Like in Scala 2, this should be valid code.
The error can be worked around by using an Array type directly (not compatible with scala 2's behaviour) or by renaming/removing the overloads on the interface.
The text was updated successfully, but these errors were encountered:
Compiler version
3.0.0 and 3.0.1
Minimized code
intf.java
impl.scala
Output
Expectation
Like in Scala 2, this should be valid code.
The error can be worked around by using an
Array
type directly (not compatible with scala 2's behaviour) or by renaming/removing the overloads on the interface.The text was updated successfully, but these errors were encountered: