Bug 14332 – support with statement and :

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2015-03-25T03:41:41Z
Last change time
2024-12-13T18:41:26Z
Assigned to
No Owner
Creator
deadalnix
Moved to GitHub: dmd#17700 →

Comments

Comment #0 by deadalnix — 2015-03-25T03:41:41Z
D supports : as an indicator to create a scope up to the end of the enclosing scope. This does not work for this: with(Foo): // Error: found ':' instead of statement If there is no specific reason for this to not work, then it should be supported.
Comment #1 by ketmar — 2015-03-25T04:06:20Z
where in specs ':' is specified as scope start?
Comment #2 by blah38621 — 2015-03-25T05:41:36Z
Going by that same definition, wouldn't: if (true): else: foreach (v; arr): etc. also be allowed? I don't believe this should be the case.
Comment #3 by deadalnix — 2015-03-26T20:33:05Z
if/else/while actually DO something. With simply change the identifier resolution rules. In fact, thinking about it, it should even be required that with is a statement.
Comment #4 by robert.schadek — 2024-12-13T18:41:26Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17700 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB