forked from scala/scala
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request scala#3729 from retronym/merge/master-to-2.11.x
Merge master to 2.11.x
- Loading branch information
Showing
27 changed files
with
352 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
t6988.scala:3: error: annotation argument needs to be a constant; found: 13.asInstanceOf[Long] | ||
@SerialVersionUID(13.asInstanceOf[Long]) case class IdentifyMessage1(userName: String, user: User, code: Int) | ||
^ | ||
t6988.scala:8: error: annotation argument needs to be a constant; found: O.SerialUID | ||
@SerialVersionUID(O.SerialUID) case class IdentifyMessage3(userName: String, user: User, code: Int) | ||
^ | ||
two errors found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
case class User() | ||
|
||
@SerialVersionUID(13.asInstanceOf[Long]) case class IdentifyMessage1(userName: String, user: User, code: Int) | ||
@SerialVersionUID(13l) case class IdentifyMessage2(userName: String, user: User, code: Int) | ||
object O { | ||
val SerialUID = "13".toLong | ||
} | ||
@SerialVersionUID(O.SerialUID) case class IdentifyMessage3(userName: String, user: User, code: Int) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
t8325-b.scala:3: error: Unmatched closing brace '}' ignored here | ||
def k(is: Int*} = ??? | ||
^ | ||
t8325-b.scala:3: error: ';' expected but '=' found. | ||
def k(is: Int*} = ??? | ||
^ | ||
t8325-b.scala:4: error: eof expected but '}' found. | ||
} | ||
^ | ||
three errors found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
trait Test { | ||
def k(is: Int*} = ??? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
t8325-c.scala:3: error: identifier expected but ')' found. | ||
def k(xx: Int`*`) = ??? | ||
^ | ||
t8325-c.scala:4: error: ')' expected but '}' found. | ||
} | ||
^ | ||
two errors found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
trait Test { | ||
def k(xx: Int`*`) = ??? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
t8325.scala:5: error: *-parameter must come last | ||
def f(is: Int*, s: String) = ??? | ||
^ | ||
t8325.scala:7: error: *-parameter must come last | ||
def h(is: Int * String *, s: String) = ??? | ||
^ | ||
t8325.scala:10: error: type mismatch; | ||
found : Int(5) | ||
required: Int* | ||
def j(is: Int* = 5) = ??? | ||
^ | ||
t8325.scala:10: error: a parameter section with a `*'-parameter is not allowed to have default arguments | ||
def j(is: Int* = 5) = ??? | ||
^ | ||
four errors found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
trait Test { | ||
type OK[A,B] = A Tuple2 B | ||
type *[A,B] = A Tuple2 B | ||
def f(is: Int*, s: String) = ??? | ||
def g(is: Int * String, s: String) = ??? // OK | ||
def h(is: Int * String *, s: String) = ??? | ||
// won't recover from following | ||
//def i(is: Int OK) = ??? //error: identifier expected but ')' found. | ||
def j(is: Int* = 5) = ??? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-Xsource:2.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
object Test { // PolyTYped function default arg unicity check, | ||
// fails in 2.11, authorized under -Xsource:2.10 | ||
def foo(printer: Any, question: => String, show: Boolean = false)(op: => Any): Any = ??? | ||
def foo[T](question: => String, show: Boolean)(op: => Any = ()): Any = ??? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
trait Test { | ||
type +[A, B] = (A, B) | ||
type *[A, B] = (A, B) | ||
|
||
type X[A, B] = A + B | ||
type Y[A, B] = A * B | ||
type Z[A, B] = A `*` B | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-Ywarn-dead-code -Xfatal-warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import scala.language.experimental.macros | ||
import scala.reflect.macros.blackbox.Context | ||
|
||
class Impl(val c: Context) { | ||
def impl: c.Tree = ??? | ||
} | ||
|
||
object Macros { | ||
def foo: Any = macro Impl.impl | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#1 13 | ||
#2 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
case class User() | ||
|
||
@SerialVersionUID(13l) case class IdentifyMessage1(userName: String, user: User, code: Int) | ||
@SerialVersionUID(10l + 3l) case class IdentifyMessage2(userName: String, user: User, code: Int) | ||
|
||
object Test extends App { | ||
println("#1 " + java.io.ObjectStreamClass.lookup(IdentifyMessage1("hei", User(), 8).getClass).getSerialVersionUID) | ||
println("#2 " + java.io.ObjectStreamClass.lookup(IdentifyMessage2("hei", User(), 8).getClass).getSerialVersionUID) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
warning: there were 2 deprecation warning(s); re-run with -deprecation for details |
Oops, something went wrong.