https://issues.dlang.org/show_bug.cgi?id=24208
Paul Backus <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[DIP1000] Nested function |[DIP1000] Scope pointer can |can pass scope pointer to |escape via non-scope |non-scope parameter |parameter of pure nested | |function --- Comment #4 from Paul Backus <[email protected]> --- The bug is caused by an undocumented special-case language rule that allows scope pointers to be assigned to non-scope parameters of pure functions in some cases. This special case is implemented in the DMD frontend by the function TypeFunction.parameterStorageClass. In comment #1's example, `escape` is inferred to be weakly pure. As a result, TypeFunction.parameterStorageClass allows the parameter `p` to accept a scope pointer as an argument, and the error that would normally be issued by checkParamArgumentEscape is suppressed. --
