diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-09-01 14:12:42 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-09-01 14:12:42 +0000 |
commit | d7cc24bf7857ffe9e8dd51e2ac7f6254013c03b6 (patch) | |
tree | 5ad173f9e6f1034c742f5378f0b608830dacb9f1 /test/files/neg/names-defaults-neg.check | |
parent | 515db1d1be97ed29c809b27da3fb31cbca897924 (diff) | |
download | scala-d7cc24bf7857ffe9e8dd51e2ac7f6254013c03b6.tar.gz scala-d7cc24bf7857ffe9e8dd51e2ac7f6254013c03b6.tar.bz2 scala-d7cc24bf7857ffe9e8dd51e2ac7f6254013c03b6.zip |
Merged revisions 22682,22685,22687,22693-22694 ...
Merged revisions 22682,22685,22687,22693-22694 via svnmerge from
https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk
........
r22682 | rytz | 2010-08-05 10:20:47 +0200 (Thu, 05 Aug 2010) | 1 line
close #3685. review by moors.
........
r22685 | rytz | 2010-08-05 17:43:46 +0200 (Thu, 05 Aug 2010) | 22 lines
close #3667. all companion objects are now serializable. note that you
can reproduce the error without default arguments:
scala> def ser(o: AnyRef) = new java.io.ObjectOutputStream(new java.io.ByteArrayOutputStream()).writeObject(o)
ser: (o: AnyRef)Unit
scala> @serializable class Outer {
| case class Inner(x: Int)
| }
defined class Outer
scala> val o = new Outer
o: Outer = Outer@34469729
scala> ser(new o.Inner(1))
scala> o.Inner // initialize the Inner$module field of o
res1: o.Inner.type = Inner
scala> ser(new o.Inner(1))
java.io.NotSerializableException: Outer$Inner$
review by extempore.
........
r22687 | rytz | 2010-08-05 22:17:38 +0200 (Thu, 05 Aug 2010) | 1 line
fixes names/defaults when using :_* for specifying repeated
parameters. close #3697, no review. ........ r22693 | rytz | 2010-08-06
17:58:44 +0200 (Fri, 06 Aug 2010) | 1 line
close #3403. BeanProperty cannot be used when renamed. no review.
........ r22694 | rytz | 2010-08-06 17:58:47 +0200 (Fri, 06 Aug 2010) |
1 line
close #2799. companion objects of deprecated classes are also marked
as deprecated. review by extempore. ........
Diffstat (limited to 'test/files/neg/names-defaults-neg.check')
-rw-r--r-- | test/files/neg/names-defaults-neg.check | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check index b2b00b7050..5d8f2e2e5d 100644 --- a/test/files/neg/names-defaults-neg.check +++ b/test/files/neg/names-defaults-neg.check @@ -120,4 +120,30 @@ names-defaults-neg.scala:124: error: parameter specified twice: a names-defaults-neg.scala:125: error: wrong number of parameters; expected = 2 val taf4: (Int, String) => Unit = testAnnFun(_, b = _) ^ -29 errors found +names-defaults-neg.scala:133: error: variable definition needs type because the name is used as named argument the definition. + def t3 { var x = t.f(x = 1) } + ^ +names-defaults-neg.scala:136: error: variable definition needs type because the name is used as named argument the definition. + object t6 { var x = t.f(x = 1) } + ^ +names-defaults-neg.scala:139: error: variable definition needs type because the name is used as named argument the definition. + class t9 { var x = t.f(x = 1) } + ^ +names-defaults-neg.scala:153: error: variable definition needs type because the name is used as named argument the definition. + def u3 { var x = u.f(x = 1) } + ^ +names-defaults-neg.scala:156: error: variable definition needs type because the name is used as named argument the definition. + def u6 { var x = u.f(x = "32") } + ^ +names-defaults-neg.scala:159: error: reference to x is ambiguous; it is both, a parameter +name of the method and the name of a variable currently in scope. + def u9 { var x: Int = u.f(x = 1) } + ^ +names-defaults-neg.scala:166: error: variable definition needs type because the name is used as named argument the definition. + class u15 { var x = u.f(x = 1) } + ^ +names-defaults-neg.scala:169: error: reference to x is ambiguous; it is both, a parameter +name of the method and the name of a variable currently in scope. + class u18 { var x: Int = u.f(x = 1) } + ^ +37 errors found |