You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get the end_line_number of a Crystal::Macros::Block that is nested. It seems to return then ending line number as if it has removed all the ending newlines and comments from the block. This is not the case for non-nested blocks and it does not remove any empty or commented lines from the beginning of the block.
Example
macroline_numbers(&block)
{{ block.body }}
{{ block.end_line_number }}
end
end_line_number =nil
line_numbers do
end_line_number = line_numbers doputs1+1endend
end_line_number = end_line_number.not_nil!
end_line_number ==12||raise"Invalid end line, should be 12 but was #{end_line_number}"
Info
Crystal version: 1.0.0
OS: MacOS
The text was updated successfully, but these errors were encountered:
Came back to this to check if #11798 would fix it and it still raises the error. But... I'm also unsure if this is a real issue or not? end_line_number is 11, but if i call block.line_number I get 9 so I'm wondering if just getting what is between do...end is what is expected to take place.
Bug Report
I'm trying to get the
end_line_number
of aCrystal::Macros::Block
that is nested. It seems to return then ending line number as if it has removed all the ending newlines and comments from the block. This is not the case for non-nested blocks and it does not remove any empty or commented lines from the beginning of the block.Example
Info
Crystal version: 1.0.0
OS: MacOS
The text was updated successfully, but these errors were encountered: