crystal icon indicating copy to clipboard operation
crystal copied to clipboard

Disallow type declarations for local variables in scopes where it's impossible to call them

Open nobodywasishere opened this issue 11 months ago • 4 comments
trafficstars

This gives an error:

def hello(begin)
end

While this does not:

def hello(begin : String)
end

It should not be possible to declare a local variable within a scope that it's impossible to call within.

nobodywasishere avatar Nov 24 '24 22:11 nobodywasishere