Bug 657 – version(): ignored

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2006-12-06T16:33:00Z
Last change time
2015-06-09T05:14:51Z
Keywords
accepts-invalid
Assigned to
bugzilla
Creator
casantander1

Comments

Comment #0 by casantander1 — 2006-12-06T16:33:42Z
This compiles successfully, but I don't think it should. //--------- void bar () { foo (); // should fail } version(none): void foo () {} //--------- $ gdmd -c test.d //---------
Comment #1 by afb — 2006-12-07T08:41:06Z
There is an error with that extra colon, after the version: version(none) void foo () {} none.d:3: undefined identifier foo none.d:3: function expected before (), not foo of type int version(none) { void foo () {} } none.d:3: undefined identifier foo none.d:3: function expected before (), not foo of type int However, maybe having the colon should be made an error ?
Comment #2 by casantander1 — 2006-12-07T08:50:48Z
(In reply to comment #1) > There is an error with that extra colon, after the version: > > version(none) > void foo () {} > > none.d:3: undefined identifier foo > none.d:3: function expected before (), not foo of type int > > version(none) > { > void foo () {} > } > > none.d:3: undefined identifier foo > none.d:3: function expected before (), not foo of type int > > However, maybe having the colon should be made an error ? > I know. This bug is actually very old, but has been ignored: 2004-10-06: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2039 2004-12-31: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2631 2006-06-20: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=7625
Comment #3 by thomas-dloop — 2006-12-30T20:10:23Z
This is an issue with DMD's frontend/documentation and not specific to GDC.
Comment #4 by bugzilla — 2007-07-01T13:27:45Z
Fixed DMD 1.018 and DMD 2.002