mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Incorporate changes for shadowing outer local var
This commit is contained in:
parent
ddbcf5cb3f
commit
14a9ec3a75
6 changed files with 64 additions and 1 deletions
|
@ -136,6 +136,19 @@ module Ameba::Rule::Lint
|
|||
CRYSTAL
|
||||
end
|
||||
|
||||
it "doesn't report if it shadows type definition" do
|
||||
expect_no_issues subject, <<-CRYSTAL
|
||||
class FooBar
|
||||
getter index : String
|
||||
|
||||
def bar
|
||||
3.times do |index|
|
||||
end
|
||||
end
|
||||
end
|
||||
CRYSTAL
|
||||
end
|
||||
|
||||
it "doesn't report if it shadows throwaway arguments" do
|
||||
expect_no_issues subject, <<-CRYSTAL
|
||||
data = [{1, "a"}, {2, "b"}, {3, "c"}]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue