digitalmars.D.bugs - [Issue 5426] New: Property syntax fails with template function with template paramters but no function parameters and you have a setter
- d-bugmail puremagic.com (46/46) Jan 07 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5426
- d-bugmail puremagic.com (10/10) Apr 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5426
- d-bugmail puremagic.com (12/12) May 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5426
- d-bugmail puremagic.com (10/10) May 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5426
http://d.puremagic.com/issues/show_bug.cgi?id=5426 Summary: Property syntax fails with template function with template paramters but no function parameters and you have a setter Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: jmdavisProg gmx.com --- Comment #0 from Jonathan M Davis <jmdavisProg gmx.com> 2011-01-07 22:27:24 PST --- This fails to compile: struct S { property T func(T)() { return T.init; } property void func(T)(T value) { } } void main() { S s; auto t = s.func!int; s.func!int = 2; } and it gives this error: l.d(16): Error: template instance func!(int) matches more than one template declaration, l.d(3):func(T) and l.d(8):func(T) If you use s.func!int(), it works. If you make it so that the setter function is no longer a property function, and you don't actually try and use the setter, then it works (though if you the try and use the non-property setter function, the property getter fails again). So, it looks like the property syntax is definitely broken for template which have a template parameter but no function parameter. This is likely related to bug# 5425, though I'm not at all sure that they're the same bug (since 5425 deals with a situation which works normally but not inside __traits). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 07 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5426 SomeDude <lovelydear mailmetrash.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lovelydear mailmetrash.com --- Comment #1 from SomeDude <lovelydear mailmetrash.com> 2012-04-22 09:51:12 PDT --- Compiles and runs with 2.059 win32. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5426 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2012-05-30 19:09:52 PDT --- Works in 2.060head. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 30 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5426 Jacob Carlborg <doob me.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |doob me.com --- Comment #3 from Jacob Carlborg <doob me.com> 2012-05-30 23:24:09 PDT --- Awesome! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 30 2012