Skip to content

Conversation

@WalterBright
Copy link
Member

No description provided.

@MartinNowak
Copy link
Member

Rebased onto scope after merging #6332. Apparently this broke one of the tests (or that was broken), see https://github.com/dlang/dmd/pull/6331/files#diff-33b3e2fefc5298c0b9de67897929e7ceR367.
Also changed to use #line pragmas to make the tests position independent.

@MartinNowak MartinNowak merged commit f0970d4 into dlang:scope Dec 18, 2016
@MartinNowak
Copy link
Member

Broke phobos again, std.array.replaceLast can't be safe because it ends up calling std.algorithm.searching.simpleMindedFind.
If you mark all of them @safe dmd complains about escaping the needle parameter through a range.save call.

std/algorithm/searching.d(2016): Error: scope variable needle assigned to non-scope parameter this calling std.range.retro!string.retro.Result!().Result.save

Apparently the check at https://github.com/dlang/dmd/pull/6331/files#diff-b86664e5c05fae51686b37d9e58043c9R9977 is not guarded by params.vsafe.

@MartinNowak
Copy link
Member

See #6340

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants