File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
src/dotty/tools/dotc/transform
test/dotty/tools/backend/jvm Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -471,6 +471,8 @@ object GenericSignatures {
471471 foldOver(tp.typeParams.nonEmpty, parents)
472472 case AnnotatedType (tpe, _) =>
473473 foldOver(x, tpe)
474+ case ExprType (tpe) =>
475+ true
474476 case tp =>
475477 foldOver(x, tp)
476478 }
Original file line number Diff line number Diff line change @@ -32,6 +32,22 @@ class TestBCode extends DottyBytecodeTest {
3232 }
3333 }
3434
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+
3551 /** This test verifies that simple matches are transformed if possible
3652 * despite no annotation
3753 */
@@ -957,7 +973,7 @@ class TestBCode extends DottyBytecodeTest {
957973
958974 @ Test
959975 def invocationReceivers (): Unit = {
960- import Opcodes ._
976+ import Opcodes .*
961977
962978 checkBCode(List (invocationReceiversTestCode.definitions(" Object" ))) { dir =>
963979 val c1 = loadClassNode(dir.lookupName(" C1.class" , directory = false ).input)
You can’t perform that action at this time.
0 commit comments