File tree 2 files changed +19
-1
lines changed
src/dotty/tools/dotc/transform
test/dotty/tools/backend/jvm
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -471,6 +471,8 @@ object GenericSignatures {
471
471
foldOver(tp.typeParams.nonEmpty, parents)
472
472
case AnnotatedType (tpe, _) =>
473
473
foldOver(x, tpe)
474
+ case ExprType (tpe) =>
475
+ true
474
476
case tp =>
475
477
foldOver(x, tp)
476
478
}
Original file line number Diff line number Diff line change @@ -32,6 +32,22 @@ class TestBCode extends DottyBytecodeTest {
32
32
}
33
33
}
34
34
35
+ @ Test def byNameParameters = {
36
+ val source = """
37
+ |class Foo {
38
+ | def byNameParam(str: => String): Unit = {}
39
+ |}
40
+ """ .stripMargin
41
+
42
+ checkBCode(source) { dir =>
43
+ val clsIn = dir.lookupName(" Foo.class" , directory = false ).input
44
+ val clsNode = loadClassNode(clsIn)
45
+ val methodNode : MethodNode = getMethod(clsNode, " byNameParam" )
46
+
47
+ assert(methodNode.signature == " (Lscala/Function0<Ljava/lang/String;>;)V" )
48
+ }
49
+ }
50
+
35
51
/** This test verifies that simple matches are transformed if possible
36
52
* despite no annotation
37
53
*/
@@ -957,7 +973,7 @@ class TestBCode extends DottyBytecodeTest {
957
973
958
974
@ Test
959
975
def invocationReceivers (): Unit = {
960
- import Opcodes ._
976
+ import Opcodes .*
961
977
962
978
checkBCode(List (invocationReceiversTestCode.definitions(" Object" ))) { dir =>
963
979
val c1 = loadClassNode(dir.lookupName(" C1.class" , directory = false ).input)
You can’t perform that action at this time.
0 commit comments