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
caseclassGen[X](value: X) {
defpass(x: X):X= x
}
test("Methods of generic type") {
valmethods=Surface.methodsOf[Gen[String]]
}
The error is:
[error] -- [E007] Type Mismatch Error: C:\Dev\airframe\airframe-surface\src\test\scala\wvlet\airframe\surface\GenericMethodTest.scala:44:35
[error] 44 | val methods = Surface.methodsOf[Gen[String]]
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] | Found: X
[error] | Required: String
Note: In my "forked" library version the same call does not fail, yet the method surfaces are not correct. Both returnType and type of parameter 'x' of pass is not String but Object. Maybe type arguments are not applied for the methods when acquiring their surface.
With Scala 2 the code compiles, but the returned types are not applied, similar to my forked library. Following test can be compiled on Scala 2 but it fails:
Following code does not compile with Scala 3:
The error is:
Note: In my "forked" library version the same call does not fail, yet the method surfaces are not correct. Both
returnType
and type of parameter 'x' ofpass
is notString
butObject
. Maybe type arguments are not applied for the methods when acquiring their surface.With Scala 2 the code compiles, but the returned types are not applied, similar to my forked library. Following test can be compiled on Scala 2 but it fails:
The text was updated successfully, but these errors were encountered: