Skip to content

Commit ee631c2

Browse files
committed
Fix #9567: Fixed by the previous commits in this PR.
1 parent c3c6533 commit ee631c2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/pos/i9567.scala

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// object Test {
2+
// val x: Int => Int = identity
3+
// }
4+
5+
trait Foo[F[_]] {
6+
def foo[G[x] >: F[x]]: G[Unit]
7+
}
8+
9+
trait M[A] {
10+
def bla: Int = 1
11+
def baz(f: Int => Int): Int = f(1)
12+
}
13+
14+
object Test {
15+
def bar(x: Foo[M]): Unit = {
16+
// error: value bla is not a member of G[Unit], where: G is a type variable with constraint >: M and <: [x] =>> Any
17+
x.foo.bla
18+
19+
// error: value bla is not a member of G[Unit], where: G is a type variable with constraint >: M and <: [x] =>> Any
20+
x.foo.baz(x => x)
21+
}
22+
}

0 commit comments

Comments
 (0)