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
The compiler generates an error that "declaration closing over non-escaping parameter 'block' may allow it to escape". However, since the inner() func can only be called from within outer(), I don't think that warning is true.
You could do something else in the inner function that captures the block in an escpaing way, but the error should only be generated if you do that.
I expect this to be valid code (unless I'm missing something else).
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: ecdf828d7ae0134e758d4be40b6d319a
duplicates:
Issue Description:
This code has a locally-defined function that captures a non-escaping block in its closure:
The compiler generates an error that "declaration closing over non-escaping parameter 'block' may allow it to escape". However, since the
inner()
func can only be called from withinouter()
, I don't think that warning is true.You could do something else in the inner function that captures the block in an escpaing way, but the error should only be generated if you do that.
I expect this to be valid code (unless I'm missing something else).
The text was updated successfully, but these errors were encountered: