Thread overview |
---|
October 30, 2007 [Issue 1627] New: ICE with a method called _ctor | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1627 Summary: ICE with a method called _ctor Product: D Version: 1.022 Platform: PC OS/Version: Windows Status: NEW Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: matti.niemenmaa+dbugzilla@iki.fi class Foo { void _ctor() {} } void main() { Foo f = new Foo(); } asdf.d(2): function asdf.Foo._ctor expected to return a value of type int Assertion failure: 'member' on line 3208 in file 'expression.c' http://www.digitalmars.com/d/1.0/lex.html states that "[i]dentifiers starting with __ (two underscores) are reserved". This code probably fails because DMD uses the name _ctor for constructors. Either that should be __ctor or names starting with only one underscore should also be reserved. In any case, an ICE shouldn't result. -- |
October 30, 2007 [Issue 1627] ICE with a method called _ctor | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1627 ------- Comment #1 from matti.niemenmaa+dbugzilla@iki.fi 2007-10-30 17:11 ------- (In reply to comment #0) > asdf.d(2): function asdf.Foo._ctor expected to return a value of type int Oops! Disregard that, the code as posted doesn't result in that error message, only the ICE. -- |
September 03, 2008 [Issue 1627] ICE with a method called _ctor | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1627 matti.niemenmaa+dbugzilla@iki.fi changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Keywords|ice-on-valid-code |ice-on-invalid-code Resolution| |FIXED ------- Comment #2 from matti.niemenmaa+dbugzilla@iki.fi 2008-09-03 01:18 ------- Changed in DMD 1.035 such that _ctor is reserved. A quick look doesn't give me anything in the docs about it but I'll leave this as a FIXED ice-on-invalid-code. -- |
September 03, 2008 [Issue 1627] ICE with a method called _ctor | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1627 ------- Comment #3 from bugzilla@digitalmars.com 2008-09-03 01:33 ------- Fixed dmd 1.035 and 2.019 -- |
Copyright © 1999-2021 by the D Language Foundation