Skip to content

Commit a0c1d5a

Browse files
author
Aggelos Biboudis
authored
Merge pull request #6229 from dotty-staging/add-inline-the-regression-test
Add regression test
2 parents 4239950 + fd17ceb commit a0c1d5a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

tests/pos/inlined-the.scala

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
locally {
17+
implied d[T] for D[T]
18+
the2[D[Int]]
19+
implicit val s: 3 = ???
20+
val a: 3 = the2[3]
21+
val b: s.type = the2[s.type]
22+
()
23+
}
24+
25+
locally {
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

Comments
 (0)