-
Notifications
You must be signed in to change notification settings - Fork 858
Fix lexing hash directives and raise errors (2nd attempt) - several cases #9906
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0999228
Fix lexing of preprocessor directive
misonijnik 4b79529
Fix error msg for single use of #indent/#light
abelbraaksma 6cbcfcd
Add more info-output to failing test
abelbraaksma 02d7b18
Fix test BuildAndClean (was always wrong!)
abelbraaksma bfb1e00
Attempted fix for untestable test
abelbraaksma e6d4c22
Fix ranges in test E_MustBeIdent02.fs
abelbraaksma a02b53f
Fix line-no in E_MustBeIdent02.fs fsharpqa test
abelbraaksma 01e700f
Fix HashConstraint02.fs, now a type error
abelbraaksma 5a882a8
Merge ServiceLexing.fs from fix-lexing-hash-directives
abelbraaksma 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
9 changes: 4 additions & 5 deletions
9
tests/fsharpqa/Source/Conformance/LexicalAnalysis/ConditionalCompilation/E_MustBeIdent02.fs
This file contains hidden or 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,9 @@ | ||
| // #Regression #Conformance #LexicalAnalysis | ||
| // #Regression #Conformance #LexicalAnalysis | ||
| // Regression test for FSHARP1.0:1419 | ||
| //<Expects id="FS1169" span="(7,13-7,16)" status="error">#if directive should be immediately followed by an identifier</Expects> | ||
| //<Expects id="FS0010" span="(8,12-8,19)" status="error">#endif has no matching #if in pattern</Expects> | ||
| //<Expects id="FS0583" span="(8,8-8,9)" status="error">Unmatched '\('</Expects> | ||
| //<Expects id="FS0039" span="(6,14-6,17)" status="error">The type 'if_' is not defined.</Expects> | ||
| //<Expects id="FS0039" span="(7,14-7,20)" status="error">The type 'endif_' is not defined.</Expects> | ||
| #light | ||
| let t8 (x : #if_) = () | ||
| let t7 (x : #endif_) = () | ||
|
|
||
| exit 1 | ||
| exit 1 |
3 changes: 1 addition & 2 deletions
3
...a/Source/Conformance/TypesAndTypeConstraints/TypeParameterDefinitions/HashConstraint02.fs
This file contains hidden or 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 hidden or 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
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.
@abelbraaksma --- is this intended?
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.
@KevinRansom I think I meant that all errors go in a resource file (iirc) and this line as it is is not localizable. When I wrote that I didn't know where to place the localizable string.
The other thing here is probably the error/warning number, which here is 0. I don't know what number to choose. It's been like that for a while, so I guess I could also fix it in a future pr. How are these numbers assigned? Just choose a free one?
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.
Side effect of current code is, I guess, that you won't be able to disable this warning as it is written...