-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Neg tests check files for // error markers (rebased and updated) #1106
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1ed3867
Negtests with // error comments
vsalvis 418c118
Negtests (JUnit only) check that each error line has a // error
vsalvis 5fc321f
Restructured JUnit neg tests
vsalvis 955b04a
Adapt neg tests to new neg tests checks
VladimirNik ff95503
Neg tests: filename checking updated
VladimirNik 70f5d93
Neg tests: remove // error from pos tests
VladimirNik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import dotty.language.noAutoTupling | ||
|
||
object autoTuplingNeg { | ||
object autoTuplingNeg2 { | ||
|
||
val x = Some(1, 2) | ||
val x = Some(1, 2) // error: too many arguments for method apply: (x: A)Some[A] | ||
|
||
x match { | ||
case Some(a, b) => a + b | ||
case Some(a, b) => a + b // error: wrong number of argument patterns for Some // error: not found: b | ||
case None => | ||
} | ||
} |
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,6 +1,6 @@ | ||
object blockescapesNeg { | ||
def m0 = { object Foo { class Bar { val field = 2 }} ; new Foo.Bar } | ||
m0.field | ||
m0.field // error | ||
class A[T] | ||
def m1 = { val x = 1; new A[x.type]} | ||
} |
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,10 +1,10 @@ | ||
object Test { | ||
def g[B >: String <: Int](x: B): Int = x | ||
def main(args: Array[String]): Unit = { | ||
g("foo") | ||
g("foo") // error: Type argument String' does not conform to upper bound Int | ||
} | ||
def baz[X >: Y, Y <: String](x: X, y: Y) = (x, y) | ||
|
||
baz[Int, String](1, "abc") | ||
baz[Int, String](1, "abc") // error: Type argument Int does not conform to lower bound Y | ||
|
||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
final class A | ||
class B extends A | ||
class C extends Option[Int] | ||
class B extends A // error: cannot extend final class A | ||
class C extends Option[Int] // error: cannot extend sealed class Option in different compilation 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,4 +1,4 @@ | ||
. | ||
. // error: expected class or object definition | ||
|
||
\u890u3084eu | ||
\u890u3084eu // error: error in unicode escape // error: illegal character '\uffff' | ||
|
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,10 +1,10 @@ | ||
object test { | ||
class A { type T } | ||
type X = A { type T = Int } | ||
class B extends X | ||
class B extends X // error | ||
type Y = A & B | ||
class C extends Y | ||
class C extends Y // error | ||
type Z = A | B | ||
class D extends Z | ||
abstract class E extends ({ val x: Int }) | ||
class D extends Z // error | ||
abstract class E extends ({ val x: Int }) // error | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose we change all compiler errors to require a source position.
Than neg tests will not need to take
xerrors
as arguments and keep it updated both in file and in test configuration.Additionally, this would allow to have a neg-dir instead of test-per-neg-test, where every file specifies how many errors it should have with
// error
comments.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DarkDimius If we decide to do it I propose to open separate pull request for it. This pull request already has long history.