File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
compiler/test/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,25 @@ class SpecializeFunction1Tests extends DottyBytecodeTest {
29
29
val applys = methods
30
30
.collect {
31
31
case m if m.name == " apply$mcII$sp" => m
32
+ case m if m.name == " apply" => m
32
33
}
34
+ .map(_.name)
33
35
.toList
34
36
35
- assert(applys.length == 1 , " Wrong number of specialized applys" )
37
+ assert(
38
+ // there should be two "apply", one generic and the one overwritten and
39
+ // then the specialized one
40
+ applys.length == 3 ,
41
+ s " Wrong number of specialized applys, actual length: ${applys.length} $applys"
42
+ )
43
+ assert(
44
+ applys.contains(" apply" ),
45
+ " Foo did not contain `apply` forwarder method"
46
+ )
47
+ assert(
48
+ applys.contains(" apply$mcII$sp" ),
49
+ " Foo did not contain specialized apply"
50
+ )
36
51
}
37
52
}
38
53
}
You can’t perform that action at this time.
0 commit comments