Open pocket7878 opened 6 days ago
At this moment, only annotations related to method definitions are allowed (arguments, blocks, and return types).
For other annotations, a blank line is required before the method definition and its annotations:
class Foo
# @rbs! type t = String | Integer
def foo: () -> untyped
end
I'm not sure this is a bug or not. But it's needed at this moment.
@tk0miya Thank you for your comment! After reporting this issue, I dived into the internal code. I found that embedding does not work when an adjacent line is handled by another rbs-inline process.
For example, this embedding works:
class Foo
# @rbs! type t = String | Integer
unsupported :code
end
This will produce:
class Foo
type t = String | Integer
end
On using embedding syntax adjacent to normal node, behavior is unexpected.
Expected behavior
Expected to output both embedded code & normal code.
Actual behavior
System configuration