digitalmars.D.bugs - [Issue 4293] New: Wrong line number with disable
- d-bugmail puremagic.com (29/29) Jun 07 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4293
- d-bugmail puremagic.com (13/13) Jun 07 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4293
- d-bugmail puremagic.com (7/7) Jun 08 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4293
- d-bugmail puremagic.com (13/13) May 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4293
http://d.puremagic.com/issues/show_bug.cgi?id=4293
Summary: Wrong line number with disable
Product: D
Version: 2.041
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: jason.james.house gmail.com
19:16:47 PDT ---
$ cat test.d
struct x{
disable this(); // line 2
this(bool b){ _b = b; }
bool _b;
}
int main(){
x; // line 7, the real source of the error
return cast(int) x._b;
}
$ dmd test.d
test.d(2): Error: constructor test.x.this default constructor not allowed for
structs
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 07 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4293
Brad Roberts <braddr puremagic.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |braddr puremagic.com
---
Maybe there's a missing error at line 7, but the error from line 2 means what
it says.. default (aka zero arg) ctors aren't allowed for structs. Now, while
I don't agree with that part of the d2 spec, that's a different issue.
ie, nothing to disable.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 07 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4293 03:31:12 PDT --- My goal with doing this was to catch uses of the default constructor because in the original use case, it was always a bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 08 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4293
Kenji Hara <k.hara.pg gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|NEW |RESOLVED
Resolution| |FIXED
In 2.060head, original code prints correct line number.
test.d(7): Error: type has no effect in expression (x)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 30 2012









d-bugmail puremagic.com 