fix(validation): fix false-positive unresolved generic symbol validation for formal parameters#1066
Merged
fix(validation): fix false-positive unresolved generic symbol validation for formal parameters#1066
Conversation
…ion for formal parameters
f0532b8 to
c5b2711
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1066 +/- ##
==========================================
+ Coverage 95.82% 95.83% +0.01%
==========================================
Files 153 153
Lines 42806 42808 +2
==========================================
+ Hits 41018 41026 +8
+ Misses 1788 1782 -6 ☔ View full report in Codecov by Sentry. |
volsa
reviewed
Jan 16, 2024
Comment on lines
+11
to
+15
| error: Invalid type nature for generic argument. __STRING_19 is no Num. | ||
| ┌─ <internal>:21:35 | ||
| │ | ||
| 21 │ myLocalNumber := FOO(x := 'INVALID TYPE NATURE'); // invalid type nature | ||
| │ ^^^^^^^^^^^^^^^^^^^^^ Invalid type nature for generic argument. __STRING_19 is no Num. |
Member
There was a problem hiding this comment.
Weird, I don't get this message when running the example locally
volsa
previously approved these changes
Jan 26, 2024
ghaith
previously approved these changes
Jan 30, 2024
ghaith
approved these changes
Feb 2, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When validating generic type-natures, we did not account for
Identifierstatements in formal parameter callsFOO(x := 0);, which will have a datatype that might look like the following example:and therefore be falsely validated as unresolved generic symbols. This PR adds an exception for
Identifierstatements during the type-nature validation.