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
Copy file name to clipboardExpand all lines: tests/neg-custom-args/fatal-warnings/structural.scala
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ object RClose {
40
40
packagep3 {
41
41
42
42
objectTest {
43
-
defidMap[C[_],T](m: { defmap[U](f: T=>U):C[U] }):C[T] = m.map(t => t) // error: polymorphic refinement method map without matching type in parent Object is no longer allowed
43
+
defidMap[C[_],T](m: { defmap[U](f: T=>U):C[U] }):C[T] = m.map(t => t) // error: polymorphic refinement method map without matching type in parent Object is no longer allowed // error: Structural access not allowed
44
44
45
45
defmain(args: Array[String]):Unit= {
46
46
idMap(Some(5)) // error: type mismatch: found Some[Int], required Object{map: [U](f: Any => U): Any}
0 commit comments