forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix liftForCoverage, in particular for erased arguments
Fixes scala#15505
- Loading branch information
1 parent
6e7adfc
commit ee4a6ce
Showing
6 changed files
with
280 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
foo(a)(b) | ||
identity(idem) | ||
foo(a)(idem) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import scala.language.experimental.erasedDefinitions | ||
|
||
erased def e(x: String): String = "x" | ||
def foo(erased a: String)(b: String): String = | ||
println(s"foo(a)($b)") | ||
b | ||
|
||
def identity(s: String): String = | ||
println(s"identity($s)") | ||
s | ||
|
||
@main | ||
def Test: Unit = | ||
foo(e("a"))("b") | ||
foo(e("a"))(identity("idem")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,225 @@ | ||
# Coverage data, format version: 3.0 | ||
# Statement data: | ||
# - id | ||
# - source path | ||
# - package name | ||
# - class name | ||
# - class type (Class, Object or Trait) | ||
# - full class name | ||
# - method name | ||
# - start offset | ||
# - end offset | ||
# - line number | ||
# - symbol name | ||
# - tree name | ||
# - is branch | ||
# - invocations count | ||
# - is ignored | ||
# - description (can be multi-line) | ||
# '' sign | ||
# ------------------------------------------ | ||
0 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
e | ||
54 | ||
66 | ||
2 | ||
e | ||
DefDef | ||
false | ||
0 | ||
false | ||
erased def e | ||
|
||
1 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
foo | ||
149 | ||
162 | ||
4 | ||
s | ||
Apply | ||
false | ||
0 | ||
false | ||
s"foo(a)($b)" | ||
|
||
2 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
foo | ||
141 | ||
163 | ||
4 | ||
println | ||
Apply | ||
false | ||
0 | ||
false | ||
println(s"foo(a)($b)") | ||
|
||
3 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
foo | ||
92 | ||
99 | ||
3 | ||
foo | ||
DefDef | ||
false | ||
0 | ||
false | ||
def foo | ||
|
||
4 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
identity | ||
213 | ||
228 | ||
8 | ||
s | ||
Apply | ||
false | ||
0 | ||
false | ||
s"identity($s)" | ||
|
||
5 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
identity | ||
205 | ||
229 | ||
8 | ||
println | ||
Apply | ||
false | ||
0 | ||
false | ||
println(s"identity($s)") | ||
|
||
6 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
identity | ||
169 | ||
181 | ||
7 | ||
identity | ||
DefDef | ||
false | ||
0 | ||
false | ||
def identity | ||
|
||
7 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
Test | ||
264 | ||
270 | ||
13 | ||
e | ||
Apply | ||
false | ||
0 | ||
false | ||
e("a") | ||
|
||
8 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
Test | ||
260 | ||
276 | ||
13 | ||
foo | ||
Apply | ||
false | ||
0 | ||
false | ||
foo(e("a"))("b") | ||
|
||
9 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
Test | ||
291 | ||
307 | ||
14 | ||
identity | ||
Apply | ||
false | ||
0 | ||
false | ||
identity("idem") | ||
|
||
10 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
Test | ||
279 | ||
308 | ||
14 | ||
foo | ||
Apply | ||
false | ||
0 | ||
false | ||
foo(e("a"))(identity("idem")) | ||
|
||
11 | ||
erased/test.scala | ||
<empty> | ||
test$package$ | ||
Object | ||
<empty>.test$package$ | ||
Test | ||
235 | ||
249 | ||
12 | ||
Test | ||
DefDef | ||
false | ||
0 | ||
false | ||
@main | ||
def Test | ||
|