diff options
author | Paul Phillips <paulp@improving.org> | 2013-03-05 12:49:13 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-03-05 12:49:13 -0800 |
commit | 32f04db6723b1c8d19f34499543b6b3dbc1f923d (patch) | |
tree | a8689a5fe57367cc69f7ef4d402530cba449866e /test/files/jvm | |
parent | c4341385629bd114b61c55103f1d83f26dce22f9 (diff) | |
parent | c8fbba0fd3149dc5642e6d56c4176244b55046fd (diff) | |
download | scala-32f04db6723b1c8d19f34499543b6b3dbc1f923d.tar.gz scala-32f04db6723b1c8d19f34499543b6b3dbc1f923d.tar.bz2 scala-32f04db6723b1c8d19f34499543b6b3dbc1f923d.zip |
Merge pull request #2203 from paulp/topic/bool-arg-rebased
Name boolean arguments (rebased)
Diffstat (limited to 'test/files/jvm')
-rw-r--r-- | test/files/jvm/named-args-in-order.check | 3 | ||||
-rw-r--r-- | test/files/jvm/named-args-in-order/SameBytecode.scala | 9 | ||||
-rw-r--r-- | test/files/jvm/named-args-in-order/Test.scala | 10 |
3 files changed, 22 insertions, 0 deletions
diff --git a/test/files/jvm/named-args-in-order.check b/test/files/jvm/named-args-in-order.check new file mode 100644 index 0000000000..29a3ba55d3 --- /dev/null +++ b/test/files/jvm/named-args-in-order.check @@ -0,0 +1,3 @@ +bytecode identical +bytecode identical +bytecode identical diff --git a/test/files/jvm/named-args-in-order/SameBytecode.scala b/test/files/jvm/named-args-in-order/SameBytecode.scala new file mode 100644 index 0000000000..c00641777e --- /dev/null +++ b/test/files/jvm/named-args-in-order/SameBytecode.scala @@ -0,0 +1,9 @@ +class SameBytecode { + def foo(a: Int, b: String) = 0 + def foo(a: Int, b: Any) = 0 + + def a = foo(0, "") + def b = foo(a = 0, "") + def c = foo(0, b = "") + def d = foo(a = 0, b = "") +}
\ No newline at end of file diff --git a/test/files/jvm/named-args-in-order/Test.scala b/test/files/jvm/named-args-in-order/Test.scala new file mode 100644 index 0000000000..36b9cbc1d1 --- /dev/null +++ b/test/files/jvm/named-args-in-order/Test.scala @@ -0,0 +1,10 @@ +import scala.tools.partest.BytecodeTest + +object Test extends BytecodeTest { + def show: Unit = { + val classNode = loadClassNode("SameBytecode") + def sameAsA(meth: String) = + sameBytecode(getMethod(classNode, "a"), getMethod(classNode, meth)) + Seq("b", "c", "d").foreach(sameAsA) + } +} |