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
9 changed files
with
86 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
dotless-targs-a.scala:4: warning: type application will be disallowed for infix operators | ||
def fn2 = List apply[Int] 2 | ||
^ | ||
dotless-targs-a.scala:9: warning: type application will be disallowed for infix operators | ||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => x) | ||
^ | ||
dotless-targs-a.scala:9: warning: type application will be disallowed for infix operators | ||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => x) | ||
^ | ||
dotless-targs-a.scala:9: warning: multiarg infix syntax looks like a tuple and will be deprecated | ||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => x) | ||
^ | ||
error: No warnings can be incurred under -Werror. | ||
4 warnings | ||
1 error |
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 @@ | ||
// scalac: -Werror -Xlint -Yrangepos:false | ||
class A { | ||
def fn1 = List apply 1 | ||
def fn2 = List apply[Int] 2 | ||
|
||
def g1: Char = "g1" toList 0 | ||
def g2: Char = "g2" apply 1 | ||
|
||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
dotless-targs-b.scala:4: error: type application is not allowed for infix operators | ||
def fn2 = List apply[Int] 2 | ||
^ | ||
dotless-targs-b.scala:9: error: type application is not allowed for infix operators | ||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => x) | ||
^ | ||
dotless-targs-b.scala:9: error: type application is not allowed for infix operators | ||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => x) | ||
^ | ||
3 errors |
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 @@ | ||
// scalac: -Werror -Xlint -Xsource:3 -Yrangepos:false | ||
class A { | ||
def fn1 = List apply 1 | ||
def fn2 = List apply[Int] 2 | ||
|
||
def g1: Char = "g1" toList 0 | ||
def g2: Char = "g2" apply 1 | ||
|
||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
dotless-targs-ranged-a.scala:4: error: type application is not allowed for infix operators | ||
def fn2 = List apply[Int] 2 | ||
^ | ||
dotless-targs-ranged-a.scala:9: error: type application is not allowed for infix operators | ||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => x) | ||
^ | ||
dotless-targs-ranged-a.scala:9: error: type application is not allowed for infix operators | ||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => x) | ||
^ | ||
dotless-targs-ranged-a.scala:13: error: type application is not allowed for infix operators | ||
def eval = 1 ->[Int] 2 | ||
^ | ||
dotless-targs-ranged-a.scala:14: error: type application is not allowed for infix operators | ||
def evil = new A() op [Int, String ] 42 | ||
^ | ||
5 errors |
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,16 @@ | ||
// scalac: -Xlint -Xsource:3 -Yrangepos:true | ||
class A { | ||
def fn1 = List apply 1 | ||
def fn2 = List apply[Int] 2 | ||
|
||
def g1: Char = "g1" toList 0 | ||
def g2: Char = "g2" apply 1 | ||
|
||
def h1 = List apply[List[Int]] (List(1), List(2)) mapConserve[List[Any]] (x => x) | ||
|
||
def op[A, B](i: Int): Int = 2*i | ||
|
||
def eval = 1 ->[Int] 2 | ||
def evil = new A() op [Int, String ] 42 | ||
} | ||
|
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,4 @@ | ||
dotless-targs.scala:2: error: type application is not allowed for postfix operators | ||
dotless-targs.scala:4: error: type application is not allowed for postfix operators | ||
def f1 = "f1" isInstanceOf[String] // not ok | ||
^ | ||
1 error |
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