-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
54 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
|
||
nsc> | ||
nsc> | ||
nsc> warning: 2 deprecations (since 2.13.2); re-run with -deprecation for details | ||
|
||
nsc> warning: 1 deprecation (since 2.13.2); re-run with -deprecation for details | ||
|
||
nsc> |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
|
||
nsc> | ||
nsc> warning: 1 deprecation (since 2.13.2); re-run with -deprecation for details | ||
|
||
nsc> | ||
nsc> |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
|
||
nsc> | ||
nsc> warning: 3 deprecations (since 2.13.2); re-run with -deprecation for details | ||
|
||
nsc> | ||
nsc> |
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 |
---|---|---|
|
@@ -84,12 +84,6 @@ hello | |
<<< bug 328 | ||
>>> bug 328 | ||
|
||
<<< bug 396 | ||
A | ||
B | ||
C | ||
>>> bug 396 | ||
|
||
<<< bug 399 | ||
a | ||
>>> bug 399 | ||
|
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 |
---|---|---|
@@ -1,53 +1,55 @@ | ||
// scalac: -Werror -Xlint:deprecation | ||
// | ||
|
||
import scala.language.{ implicitConversions } | ||
abstract class BaseList { | ||
type Node <: NodeImpl; | ||
implicit def convertNode(ni : NodeImpl) = ni.asInstanceOf[Node]; | ||
abstract class NodeImpl; | ||
type Node <: BaseNodeImpl | ||
implicit def convertNode(ni : BaseNodeImpl) = ni.asInstanceOf[Node]; | ||
abstract class BaseNodeImpl | ||
} | ||
abstract class LinkedList extends BaseList { | ||
type Node <: NodeImpl; | ||
trait NodeImpl extends super.NodeImpl; | ||
type Node <: NodeImpl0 | ||
trait NodeImpl0 extends super.BaseNodeImpl; | ||
} | ||
trait OffsetList extends LinkedList { | ||
type Node <: NodeImpl; | ||
trait NodeImpl extends super.NodeImpl; | ||
type Node <: NodeImpl1 | ||
trait NodeImpl1 extends super.NodeImpl0 | ||
} | ||
|
||
trait PriorityTree extends BaseList { | ||
type Node <: NodeImpl; | ||
trait NodeImpl extends super.NodeImpl { | ||
def chop : Node = this; | ||
type Node <: NodeImpl2 | ||
trait NodeImpl2 extends super.BaseNodeImpl { | ||
def chop : Node = this | ||
} | ||
} | ||
|
||
trait PrecedenceParser extends LinkedList with PriorityTree { | ||
type Node <: NodeImpl; | ||
trait NodeImpl extends super[LinkedList].NodeImpl with super[PriorityTree].NodeImpl; | ||
type Node <: NodeImpl3 | ||
trait NodeImpl3 extends super[LinkedList].NodeImpl0 with super[PriorityTree].NodeImpl2 | ||
} | ||
|
||
trait Matcher extends PrecedenceParser { | ||
type Node <: NodeImpl; | ||
trait NodeImpl extends super.NodeImpl; | ||
type Node <: NodeImpl4 | ||
trait NodeImpl4 extends super.NodeImpl3 | ||
|
||
type Matchable <: Node with MatchableImpl; | ||
implicit def convertMatchable(m : MatchableImpl) = m.asInstanceOf[Matchable]; | ||
trait MatchableImpl extends NodeImpl { | ||
type Matchable <: Node with MatchableImpl0 | ||
implicit def convertMatchable(m : MatchableImpl0) = m.asInstanceOf[Matchable] | ||
trait MatchableImpl0 extends NodeImpl4 { | ||
override def chop : Node = { | ||
Console.println("passed"); super.chop; | ||
} | ||
} | ||
} | ||
|
||
class Test1 extends OffsetList with Matcher { | ||
type Node = NodeImpl; | ||
trait NodeImpl extends super[OffsetList].NodeImpl with super[Matcher].NodeImpl; | ||
class MatchableImpl extends super.MatchableImpl with NodeImpl; | ||
type Matchable = MatchableImpl; | ||
type Node = NodeImpl5 | ||
trait NodeImpl5 extends super[OffsetList].NodeImpl1 with super[Matcher].NodeImpl4 | ||
class MatchableImpl1 extends super.MatchableImpl0 with NodeImpl5 | ||
type Matchable = MatchableImpl1 | ||
} | ||
|
||
object Test extends App { | ||
val test = new Test1; | ||
val m = new test.MatchableImpl; | ||
m.chop; | ||
val test = new Test1 | ||
val m = new test.MatchableImpl1 | ||
m.chop | ||
} |
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,3 @@ | ||
t6677b.scala:15: warning: class shadowing is deprecated but class X shadows class X defined in trait U1; rename the class to something else | ||
class U11 extends U1 { class X extends super.X { foo } } // refer to foo to add $outer pointer | ||
^ |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// scalac: -Xlint:deprecation | ||
// | ||
|
||
trait U { | ||
trait U1 { | ||
class X | ||
|
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
t744.scala:12: warning: class shadowing is deprecated but class FileImpl shadows trait FileImpl defined in trait Linked; rename the class to something else | ||
trait FileImpl extends super.FileImpl { | ||
^ | ||
BEGIN | ||
Hello from linked | ||
END |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// scalac: -Xlint:deprecation | ||
// | ||
|
||
trait Linked { | ||
type File <: FileImpl; | ||
trait FileImpl { | ||
|