digitalmars.D.bugs - [Issue 1680] New: static struct constructor overloaded with method prevents compilation in inner function
- d-bugmail puremagic.com (49/49) Nov 20 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1680
- d-bugmail puremagic.com (10/10) Feb 23 2013 http://d.puremagic.com/issues/show_bug.cgi?id=1680
- d-bugmail puremagic.com (6/6) Mar 01 2013 http://d.puremagic.com/issues/show_bug.cgi?id=1680
http://d.puremagic.com/issues/show_bug.cgi?id=1680 Summary: static struct constructor overloaded with method prevents compilation in inner function Product: D Version: 2.007 Platform: PC OS/Version: All Status: NEW Keywords: rejects-valid Severity: major Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: schveiguy yahoo.com Not sure if this is the minimal case. Also happens on d 1.023 struct X { int _y; int blah() { return _y; } static X blah(int n) { return X(n); } static X blah2(int n) { return X(n); } static X blah2(char[] n) { return X(n.length); } } void main() { // OK X v = X.blah(5); void f() { // OK X v1 = X.blah2(5); X v2 = X.blah2("hello".dup); // Error: 'this' is only allowed in non-static member functions, not f X v3 = X.blah(5); } } --
Nov 20 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1680 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-02-23 20:36:43 PST --- https://github.com/D-Programming-Language/dmd/pull/1687 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 23 2013
http://d.puremagic.com/issues/show_bug.cgi?id=1680 --- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2013-03-01 02:44:31 PST --- Fixed for D2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 01 2013