Skip to content

Commit d3638e5

Browse files
lrytzadriaanm
authored andcommitted
Named and default arguments
- MethodTypes now have (params: List[Symbol]) - "copy"-methods for case classes - the "copy" object in the compiler is now called "treeCopy"
1 parent c133473 commit d3638e5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/library/scala/xml/NodeSeq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ abstract class NodeSeq extends immutable.Sequence[Node] with SequenceTemplate[No
5151
def apply(f: Node => Boolean): NodeSeq = filter(f)
5252

5353
/** structural equality */
54-
override def equals(x: Any) = x match {
54+
override def equals(x: Any): Boolean = x match {
5555
case z:Node => (length == 1) && z == apply(0)
5656
case z:Seq[_] => sameElements(z)
5757
case z:String => text == z

test/files/jvm/interpreter.check

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ scala>
55
scala>
66
scala> res0: Int = 7
77

8-
scala> | | | | gcd: (Int,Int)Int
8+
scala> | | | | gcd: (x: Int,y: Int)Int
99

1010
scala> five: Int = 5
1111

@@ -59,7 +59,7 @@ scala> defined class Foo
5959

6060
scala> defined class Bar
6161

62-
scala> foo2bar: (Foo)Bar
62+
scala> foo2bar: (foo: Foo)Bar
6363

6464
scala> bar: Bar = Bar(3)
6565

@@ -206,11 +206,11 @@ missing combination Term
206206

207207
def f(e: Exp) = e match { // non-exhaustive warning here
208208
^
209-
f: (Exp)Int
209+
f: (e: Exp)Int
210210

211211
scala>
212212
scala>
213-
plusOne: (Int)Int
213+
plusOne: (x: Int)Int
214214
res0: Int = 6
215215
res0: java.lang.String = after reset
216216
<console>:5: error: not found: value plusOne

test/files/run/t1500.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
defined class posingAs
2-
resolve: [A,B](A @posingAs[B])B
2+
resolve: [A,B](x: A @posingAs[B])B
33
x: Any = 7

test/files/run/t1501.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
defined class xyz
2-
loopWhile: [T](=> Boolean)(=> Unit @xyz[T])Unit @xyz[T]
2+
loopWhile: [T](cond: => Boolean)(body: => Unit @xyz[T])Unit @xyz[T]
33
test: ()Unit @xyz[Int]

0 commit comments

Comments
 (0)