We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4239950 + fd17ceb commit a0c1d5aCopy full SHA for a0c1d5a
tests/pos/inlined-the.scala
@@ -0,0 +1,40 @@
1
+object Instances {
2
+
3
+ class D[T]
4
5
+ class C {
6
+ def f() = {
7
+ locally {
8
+ implied d[T] for D[T]
9
+ the[D[Int]]
10
+ implicit val s: 3 = ???
11
+ val a: 3 = the[3]
12
+ val b: s.type = the[s.type]
13
+ ()
14
+ }
15
16
17
18
+ the2[D[Int]]
19
20
+ val a: 3 = the2[3]
21
+ val b: s.type = the2[s.type]
22
23
24
25
26
+ implicit val s: List[3] = ???
27
+ val a: List[3] = the2[List[3]]
28
29
+ implicit val sl: List[s.type] = ???
30
+ val b: List[s.type] = the2[List[s.type]]
31
32
33
34
35
36
+ inline def the2[T](implicit x: T): x.type = x
37
38
+ inline def theList[T](implicit x: T): List[x.type] = List[x.type](x)
39
40
+}
0 commit comments