-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
//> using
directive in compilation tests
* Set options with `//> using` * Put together tests that need deep subtypes * -Ycheck tests/run/typeclass-derivation1.scala [Cherry-picked daeee35][modified]
- Loading branch information
Showing
146 changed files
with
247 additions
and
76 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
2 changes: 2 additions & 0 deletions
2
...s/neg-custom-args/isInstanceOf/1828.scala → tests/neg-deep-subtype/1828.scala
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
2 changes: 2 additions & 0 deletions
2
.../neg-custom-args/isInstanceOf/3324b.scala → tests/neg-deep-subtype/3324b.scala
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
2 changes: 2 additions & 0 deletions
2
.../neg-custom-args/isInstanceOf/3324f.scala → tests/neg-deep-subtype/3324f.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
trait C[T] | ||
class D[T] | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
.../neg-custom-args/isInstanceOf/3324g.scala → tests/neg-deep-subtype/3324g.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
class Test { | ||
trait A[+T] | ||
class B[T] extends A[T] | ||
|
2 changes: 2 additions & 0 deletions
2
...ustom-args/isInstanceOf/4075.scala.ignore → tests/neg-deep-subtype/4075.scala.ignore
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
object Test { | ||
trait Foo | ||
case class One[+T](fst: T) | ||
|
2 changes: 2 additions & 0 deletions
2
...om-args/isInstanceOf/JavaSeqLiteral.scala → tests/neg-deep-subtype/JavaSeqLiteral.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
object Test1 { | ||
trait Tree[-T] | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...neg-custom-args/conditionalWarnings.scala → ...eg-deep-subtype/conditionalWarnings.scala
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
2 changes: 2 additions & 0 deletions
2
...stom-args/isInstanceOf/enum-approx2.scala → tests/neg-deep-subtype/enum-approx2.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
sealed trait Exp[T] | ||
case class Fun[A, B](f: Exp[A => B]) extends Exp[A => B] | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
...s/neg-custom-args/isInstanceOf/gadt.scala → tests/neg-deep-subtype/gadt.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
class Test { | ||
trait A[+T] | ||
class B[T] extends A[T] | ||
|
2 changes: 2 additions & 0 deletions
2
...s/neg-custom-args/isInstanceOf/html.scala → tests/neg-deep-subtype/html.scala
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
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
...neg-custom-args/isInstanceOf/i11178.scala → tests/neg-deep-subtype/i11178.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
trait Box[+T] | ||
case class Foo[+S](s: S) extends Box[S] | ||
|
||
|
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
.../neg-custom-args/isInstanceOf/i3324.scala → tests/neg-deep-subtype/i3324.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
class Foo { | ||
def foo(x: Any): Boolean = | ||
x.isInstanceOf[List[String]] // error | ||
|
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
.../neg-custom-args/isInstanceOf/i4297.scala → tests/neg-deep-subtype/i4297.scala
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
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
.../neg-custom-args/isInstanceOf/i5495.scala → tests/neg-deep-subtype/i5495.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
class A | ||
class B | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
.../neg-custom-args/isInstanceOf/i5826.scala → tests/neg-deep-subtype/i5826.scala
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
2 changes: 2 additions & 0 deletions
2
...neg-custom-args/isInstanceOf/i5826b.scala → tests/neg-deep-subtype/i5826b.scala
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
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
.../neg-custom-args/isInstanceOf/i8932.scala → tests/neg-deep-subtype/i8932.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
sealed trait Foo[+A] | ||
case class Bar[A]() extends Foo[A] | ||
|
||
|
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
...s/neg-custom-args/interop-polytypes.scala → .../neg-deep-subtype/interop-polytypes.scala
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
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
...tom-args/isInstanceOf/or-type-trees.scala → tests/neg-deep-subtype/or-type-trees.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
object Test1 { | ||
trait Tree | ||
trait Context | ||
|
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
...om-args/isInstanceOf/patmat-applied.scala → tests/neg-deep-subtype/patmat-applied.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
class A[-T] | ||
class B[T] extends A[T] | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
...tom-args/isInstanceOf/refined-types.scala → tests/neg-deep-subtype/refined-types.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
class A | ||
class B extends A | ||
type AA = A { type T = Int } | ||
|
2 changes: 2 additions & 0 deletions
2
.../neg-custom-args/isInstanceOf/t2755.scala → tests/neg-deep-subtype/t2755.scala
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
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
...ustom-args/isInstanceOf/type-lambda.scala → tests/neg-deep-subtype/type-lambda.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
trait A[T] | ||
trait B[T] extends A[T] | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
tests/neg-strict/deprecated-override.scala → tests/neg/deprecated-override.scala
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,5 @@ | ||
//> using options -source future -deprecation -Xfatal-warnings | ||
|
||
trait A: | ||
def f: 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
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,3 +1,5 @@ | ||
//> using options -source future -deprecation -Xfatal-warnings | ||
|
||
trait X { | ||
type T | ||
def process(t: T): Unit | ||
|
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,5 @@ | ||
//> using options -source future -deprecation -Xfatal-warnings | ||
|
||
object bar { | ||
trait Sub { | ||
type M | ||
|
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
tests/pos-special/isInstanceOf/3324c.scala → tests/pos-deep-subtype/3324c.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
sealed trait A[T] | ||
class B[T] extends A[T] | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
tests/pos-special/isInstanceOf/3324d.scala → tests/pos-deep-subtype/3324d.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
class Test { | ||
val x: Any = ??? | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
tests/pos-special/isInstanceOf/3324e.scala → tests/pos-deep-subtype/3324e.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
class C[T] { | ||
val x: T = ??? | ||
x.isInstanceOf[T] | ||
|
2 changes: 2 additions & 0 deletions
2
tests/pos-special/isInstanceOf/3324h.scala → tests/pos-deep-subtype/3324h.scala
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,5 @@ | ||
//> using options -Xfatal-warnings | ||
|
||
object Test { | ||
trait Marker | ||
def foo[T](x: T) = x match { | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.