Thread overview |
---|
December 28, 2006 [Issue 764] New: (typeof(o)).classinfo causes parser error | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=764 Summary: (typeof(o)).classinfo causes parser error Product: D Version: unspecified Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: ddaglas@gmail.com For the following source code: void main() { Object o = new Object(); printf("%*s\n", typeof(o).classinfo.name); // compiles ok printf("%*s\n", (typeof(o)).classinfo.name); // error } compilation fails (on win32) with the following message: main.d(4): found '.' when expecting ',' --- errorlevel 1 -- |
December 29, 2006 Re: [Issue 764] New: (typeof(o)).classinfo causes parser error | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | == Quote from d-bugmail (d-bugmail@puremagic.com)'s article
> http://d.puremagic.com/issues/show_bug.cgi?id=764
> Summary: (typeof(o)).classinfo causes parser error
> Product: D
> Version: unspecified
> Platform: PC
> OS/Version: Windows
> Status: NEW
> Severity: normal
> Priority: P2
> Component: DMD
> AssignedTo: bugzilla@digitalmars.com
> ReportedBy: ddaglas@gmail.com
> For the following source code:
> void main() {
> Object o = new Object();
> printf("%*s\n", typeof(o).classinfo.name); // compiles ok
> printf("%*s\n", (typeof(o)).classinfo.name); // error
> }
> compilation fails (on win32) with the following message:
> main.d(4): found '.' when expecting ','
> --- errorlevel 1
On a related note, compiling with -H added the ()'s around the typeof(...) in the
resulting .di file, which subsequently triggered the bug.
Is it a bug that DMD adds the ()'s around the typeof(...)?
--Dan
|
January 04, 2007 [Issue 764] (typeof(o)).classinfo causes parser error | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=764 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from bugzilla@digitalmars.com 2007-01-03 22:16 ------- Fixed DMD 1.00 -- |
February 27, 2007 [Issue 764] (typeof(o)).classinfo causes parser error | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=764 thomas-dloop@kuehne.cn changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Windows |All ------- Comment #3 from thomas-dloop@kuehne.cn 2007-02-27 10:48 ------- Added to DStress as http://dstress.kuehne.cn/run/t/typeof_16_A.d http://dstress.kuehne.cn/run/t/typeof_16_B.d -- |
Copyright © 1999-2021 by the D Language Foundation