Skip to content

Commit

Permalink
Merge pull request #3046 from onflow/jribbink/fix-suggest-am
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent authored Jan 25, 2024
2 parents 301c963 + 814783b commit 40b4d69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions runtime/parser/declaration.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func parseDeclaration(p *parser, docString string) (ast.Declaration, error) {
func handlePriv(p *parser) {
p.report(p.syntaxErrorWithSuggestedFix(
"`priv` is no longer a valid access keyword",
"`access(self)`",
"access(self)",
))
p.next()
}
Expand All @@ -298,7 +298,7 @@ func handlePub(p *parser) error {
p.report(NewSyntaxErrorWithSuggestedReplacement(
pubToken.Range,
"`pub` is no longer a valid access keyword",
"`access(all)`",
"access(all)",
))
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/parser/declaration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9664,7 +9664,7 @@ func TestParseDeprecatedAccessModifiers(t *testing.T) {
StartPos: ast.Position{Offset: 1, Line: 1, Column: 1},
EndPos: ast.Position{Offset: 3, Line: 1, Column: 3},
},
SuggestedFix: "`access(all)`",
SuggestedFix: "access(all)",
},
},
errs,
Expand All @@ -9685,7 +9685,7 @@ func TestParseDeprecatedAccessModifiers(t *testing.T) {
StartPos: ast.Position{Offset: 1, Line: 1, Column: 1},
EndPos: ast.Position{Offset: 4, Line: 1, Column: 4},
},
SuggestedFix: "`access(self)`",
SuggestedFix: "access(self)",
},
},
errs,
Expand Down

0 comments on commit 40b4d69

Please sign in to comment.