-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Dafny scanner no longer recognizes lines beginning with # as prag…
…mas (#3452) Fixes #3451 <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small> --------- Co-authored-by: davidcok <[email protected]> Co-authored-by: Fabio Madge <[email protected]> Co-authored-by: Aaron Tomb <[email protected]> Co-authored-by: Remy Willems <[email protected]> Co-authored-by: Mikaël Mayer <[email protected]> Co-authored-by: stefan-aws <[email protected]> Co-authored-by: Aaron Tomb <[email protected]> Co-authored-by: Alex Chew <[email protected]>
- Loading branch information
1 parent
9b97489
commit 791a127
Showing
6 changed files
with
28 additions
and
1 deletion.
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,10 @@ | ||
// RUN: %exits-with 2 %baredafny resolve --use-basename-for-filename "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
// The #line should no longer be special | ||
const s := @" | ||
#line 5 | ||
" | ||
const k = 6 // 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,2 @@ | ||
git-issue-3451.dfy(8,10): Error: a const field should be initialized using ':=', not '=' | ||
1 parse errors detected in git-issue-3451.dfy |
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,8 @@ | ||
// RUN: %exits-with 2 %baredafny resolve --use-basename-for-filename "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
// The #line should no longer be special | ||
#line Q | ||
#zzzz | ||
|
||
|
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 @@ | ||
git-issue-3451a.dfy(1,0): Warning: File contains no code | ||
git-issue-3451a.dfy(5,0): Error: this symbol not expected in Dafny | ||
1 parse errors detected in git-issue-3451a.dfy |
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 @@ | ||
The Dafny scanner no longer treats lines beginning with # (even those in strings) as pragmas. |