diff --git a/smoke/struct-with-block.rb b/smoke/struct-with-block.rb new file mode 100644 index 000000000..e8e2ce139 --- /dev/null +++ b/smoke/struct-with-block.rb @@ -0,0 +1,19 @@ +Foo = Struct.new(:foo) do + def foo? + !!foo + end + + private + + def not_foo? + !foo + end +end +__END__ +# Classes +class Foo < Struct[untyped] + attr_accessor foo(): untyped + def foo?: -> bool + private + def not_foo?: -> bool +end