File tree 3 files changed +4
-10
lines changed
3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 1
- -- [E007] Type Mismatch Error: tests/neg/cc-poly-2.scala:13:15 ---------------------------------------------------------
2
- 13 | f[Nothing](d) // error
3
- | ^
4
- | Found: (d : Test.D^)
5
- | Required: Test.D
6
- |
7
- | longer explanation available when compiling with `-explain`
8
1
-- [E007] Type Mismatch Error: tests/neg/cc-poly-2.scala:14:19 ---------------------------------------------------------
9
2
14 | f[CapSet^{c1}](d) // error
10
3
| ^
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ object Test:
10
10
11
11
def test (c1 : C , c2 : C ) =
12
12
val d : D ^ = D ()
13
- f[Nothing ](d) // error
13
+ // f[Nothing](d) // already rule out at typer
14
14
f[CapSet ^ {c1}](d) // error
15
15
val x = f(d)
16
16
val _: D ^ {c1} = x // error
Original file line number Diff line number Diff line change @@ -20,13 +20,14 @@ import caps.unbox
20
20
21
21
def test1 (async1 : Async , @ unbox others : List [Async ]) =
22
22
val src = Source [CapSet ^ {async1, others* }]
23
+ val _: Set [Listener ^ {async1, others* }] = src.allListeners
23
24
val lst1 = listener(async1)
24
25
val lsts = others.map(listener)
25
26
val _: List [Listener ^ {others* }] = lsts
26
27
src.register{lst1}
27
28
src.register(listener(async1))
28
- lsts.foreach(src.register)
29
- others.map(listener).foreach(src.register)
29
+ lsts.foreach(src.register(_)) // TODO: why we need to use _ explicitly here?
30
+ others.map(listener).foreach(src.register(_) )
30
31
val ls = src.allListeners
31
32
val _: Set [Listener ^ {async1, others* }] = ls
32
33
You can’t perform that action at this time.
0 commit comments