Add experimental warnings for defer, class, field, method#311
Merged
Conversation
- Added "defer is experimental" warning when using defer blocks - Added "class is experimental" warning when using class keyword - Added "field is experimental" warning when using field keyword - Added "method is experimental" warning when using method keyword - Added warningLocation() method to ErrorMessageUtil for Perl-style location format - Updated declared_refs warning to use the same format - All warnings can be disabled with no warnings 'experimental::...' Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Emits warning when using \$x = \$y syntax with refaliasing feature - Warning can be disabled with no warnings 'experimental::refaliasing' - Or by using: use experimental 'refaliasing' Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- `our` variables now show "redeclared" instead of "masks earlier declaration" - `my` variables now show "masks earlier declaration in same scope" - Removed "Warning:" prefix to match system Perl format - Fixed typo "ctx.symbolTable" to "scope" in warning message Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
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.
Summary
Added experimental warnings that match system Perl's format for:
defer- "defer is experimental at filename line N."class- "class is experimental at filename line N."field- "field is experimental at filename line N."method- "method is experimental at filename line N."Also updated the existing
declared_refswarning to use the same format.Before (no warnings emitted)
After
Warnings can be disabled
Implementation
warningLocation()method toErrorMessageUtilthat returns " at filename line N" (matching system Perl's format without the ", near" suffix)Test Plan
no warningsproperly disables the warningsGenerated with Devin