Closed caspiano closed 2 years ago
Moves the restriction of the return type to the bottom of the method due to the begin...end block causing the return type to be spuriously nillable.
begin...end
typeof (a compile-time operation) is used to deduce the correct return type from the block.
typeof
I included these changes with some other refactors that I did to create an explicit in_span/close_span that doesn't use a block.
Thanks for this PR. I like that technique of using typeof on the yield.
Moves the restriction of the return type to the bottom of the method due to the
begin...end
block causing the return type to be spuriously nillable.typeof
(a compile-time operation) is used to deduce the correct return type from the block.