Skip to content

Commit

Permalink
Fix newlines between methods with signatures
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
  • Loading branch information
Morriar committed May 4, 2021
1 parent eb4f1d2 commit a9ca6d5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/tapioca/compilers/symbol_table_compiler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2231,10 +2231,13 @@ class Buzz
class Foo
sig { params(a: Integer, b: String).returns(Integer) }
def bar(a, b:); end
sig { type_parameters(:U).params(a: T.type_parameter(:U)).returns(T.type_parameter(:U)) }
def baz(a); end
sig { params(a: Integer, b: String).void }
def foo(a, b:); end
sig { params(a: Integer, b: Integer, c: Integer, d: Integer, e: Integer, f: Integer, blk: T.proc.void).void }
def many_kinds_of_args(*a, b, c, d:, e: T.unsafe(nil), **f, &blk); end
Expand Down Expand Up @@ -2291,11 +2294,15 @@ class Quux::Concrete
sig { returns(String) }
def bar; end
sig { params(baz: T::Hash[String, Object]).returns(T::Hash[String, Object]) }
def baz=(baz); end
sig { returns(T::Array[Integer]) }
def foo; end
def foo=(_arg0); end
sig { override.returns(Integer) }
def something; end
end
Expand Down Expand Up @@ -2463,8 +2470,10 @@ def baz(a)
output = template(<<~RBI)
class Foo
def bar(*args, &blk); end
sig { type_parameters(:U).params(a: T.type_parameter(:U)).returns(T.type_parameter(:U)) }
def baz(a); end
def foo(*args, &blk); end
end
RBI
Expand Down Expand Up @@ -2502,8 +2511,10 @@ class Foo
class << self
sig { returns(T.attached_class) }
def a; end
sig { returns(T::Hash[T.attached_class, T::Array[T.attached_class]]) }
def b; end
sig { returns(Foo::FooAttachedClass) }
def c; end
end
Expand Down

0 comments on commit a9ca6d5

Please sign in to comment.