Bug 17408 – scope and in are considered redundant

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-05-18T12:36:20Z
Last change time
2024-12-13T18:52:13Z
Keywords
pull
Assigned to
No Owner
Creator
Mathias Lang
Moved to GitHub: dmd#17794 →

Comments

Comment #0 by mathias.lang — 2017-05-18T12:36:20Z
``` void foo (in scope char[]) {} ``` Result in: test.d(1): Error: redundant attribute 'scope' The other way around (scope in) results in an error message mentioning `in` as redundant as well. Before `in` used to mean `const scope`, but nowadays it only means `const`, so the two aren't redundant.
Comment #1 by dfj1esp02 — 2017-05-19T11:31:07Z
Maybe only @safe code should treat in as const? I think @system code should still treat it as const scope.
Comment #2 by dlang-bot — 2019-07-13T09:27:35Z
@Geod24 created dlang/dmd pull request #10168 " Fix issue 17408: scope and in are considered redundant" fixing this issue: - Fix issue 17408: scope and in are considered redundant https://github.com/dlang/dmd/pull/10168
Comment #3 by razvan.nitu1305 — 2022-11-18T14:39:16Z
Now that we have -preview=in should we close this?
Comment #4 by robert.schadek — 2024-12-13T18:52:13Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17794 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB