Do not report type declarations within generic records

This commit is contained in:
Sijawusz Pur Rahnama 2024-01-16 02:04:41 +01:00
parent b56d34715d
commit f2677d68f6
2 changed files with 18 additions and 4 deletions

View file

@ -394,6 +394,12 @@ module Ameba::Rule::Lint
CRYSTAL
end
it "doesn't report if this is a record declaration (generics)" do
expect_no_issues subject, <<-CRYSTAL
record Foo(T), foo : T
CRYSTAL
end
it "doesn't report if this is an accessor declaration" do
accessor_macros = %w[setter class_setter]
%w[getter class_getter property class_property].each do |name|