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#6500 from eed3si9n/wip/deprecate-view-bounds
scala/bug#10719. Deprecate view bounds without -Xfuture
- Loading branch information
Showing
14 changed files
with
43 additions
and
22 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
view-bounds-deprecation.scala:2: warning: view bounds are deprecated; use an implicit parameter instead. | ||
example: instead of `def f[A <% Int](a: A)` use `def f[A](a: A)(implicit ev: A => Int)` | ||
def f[A <% Int](a: A) = null | ||
^ | ||
view-bounds-deprecation.scala:3: warning: view bounds are deprecated; use an implicit parameter instead. | ||
example: instead of `def f[A <% Int](a: A)` use `def f[A](a: A)(implicit ev: A => Int)` | ||
def g[C, B <: C, A <% B : Numeric](a: A) = null | ||
^ | ||
error: No warnings can be incurred under -Xfatal-warnings. | ||
two warnings found | ||
one error 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 @@ | ||
-deprecation -Xfatal-warnings |
File renamed without changes.
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 @@ | ||
view-bounds-removal.scala:2: error: view bounds are unsupported; use an implicit parameter instead. | ||
example: instead of `def f[A <% Int](a: A)` use `def f[A](a: A)(implicit ev: A => Int)` | ||
def f[A <% Int](a: A) = null | ||
^ | ||
view-bounds-removal.scala:3: error: view bounds are unsupported; use an implicit parameter instead. | ||
example: instead of `def f[A <% Int](a: A)` use `def f[A](a: A)(implicit ev: A => Int)` | ||
def g[C, B <: C, A <% B : Numeric](a: A) = null | ||
^ | ||
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 @@ | ||
-Xsource:2.14 |
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 @@ | ||
object Test { | ||
def f[A <% Int](a: A) = null | ||
def g[C, B <: C, A <% B : Numeric](a: A) = null | ||
} |
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 +1,5 @@ | ||
Macros_Test_2.scala:10: warning: view bounds are deprecated; use an implicit parameter instead. | ||
example: instead of `def f[A <% Int](a: A)` use `def f[A](a: A)(implicit ev: A => Int)` | ||
def bar[T <% Option[Int]](x: T) = println(x) | ||
^ | ||
2 |
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 @@ | ||
-deprecation |
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