File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ -- [E007] Type Mismatch Error: tests/neg/i6779.scala:9:30 --------------------------------------------------------------
2
+ 9 |def g1[T](x: T): F[G[T]] = x.f(given summon[Stuff]) // error
3
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
4
+ | Found: F[T]
5
+ | Required: F[G[T]]
6
+ -- [E007] Type Mismatch Error: tests/neg/i6779.scala:11:27 -------------------------------------------------------------
7
+ 11 |def g2[T](x: T): F[G[T]] = x.f // error
8
+ | ^
9
+ | Found: F[T]
10
+ | Required: F[G[T]]
11
+ -- [E007] Type Mismatch Error: tests/neg/i6779.scala:13:31 -------------------------------------------------------------
12
+ 13 |def g3[T](x: T): F[G[T]] = f(x)(given summon[Stuff]) // error
13
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
14
+ | Found: F[T]
15
+ | Required: F[G[T]]
Original file line number Diff line number Diff line change
1
+ type F [T ]
2
+ type G [T ]
3
+ type Stuff
4
+ given Stuff = ???
5
+
6
+ def (x : T ) f[T ](given Stuff ): F [T ] = ???
7
+
8
+
9
+ def g1 [T ](x : T ): F [G [T ]] = x.f(given summon [Stuff ]) // error
10
+
11
+ def g2 [T ](x : T ): F [G [T ]] = x.f // error
12
+
13
+ def g3 [T ](x : T ): F [G [T ]] = f(x)(given summon [Stuff ]) // error
You can’t perform that action at this time.
0 commit comments