diff options
Diffstat (limited to 'tests/pos/nameddefaults.scala')
-rw-r--r-- | tests/pos/nameddefaults.scala | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/pos/nameddefaults.scala b/tests/pos/nameddefaults.scala index 671f14a07..20a0eae47 100644 --- a/tests/pos/nameddefaults.scala +++ b/tests/pos/nameddefaults.scala @@ -1,7 +1,7 @@ object nameddefaults { def foo(first: Int, second: Int = 2, third: Int = 3) = first + second - + var x = 1 var y = 2 @@ -12,7 +12,7 @@ object nameddefaults { foo(1) // named and missing arguments - + foo(first = 1, second = 3) foo(second = 3, first = 1) @@ -20,7 +20,7 @@ object nameddefaults { foo(first = 2, third = 3) foo(2, third = 3) - + // same but with non-idempotent expressions foo(first = x, second = y) @@ -30,11 +30,11 @@ object nameddefaults { foo(first = x, third = y) foo(x, third = y) - + // The same thing, but for classes - + class C(first: Int, second: Int = 2, third: Int = 3) {} - + new C(1, 2, 3) new C(1, 2) @@ -42,7 +42,7 @@ object nameddefaults { new C(1) // named and missing arguments - + new C(first = 1, second = 3) new C(second = 3, first = 1) @@ -50,7 +50,7 @@ object nameddefaults { new C(first = 2, third = 3) new C(2, third = 3) - + // same but with non-idempotent expressions new C(first = x, second = y) |