digitalmars.D.bugs - [Issue 5101] New: Poorly formed error against non-const template on const object
- d-bugmail puremagic.com (39/39) Oct 22 2010 http://d.puremagic.com/issues/show_bug.cgi?id=5101
- d-bugmail puremagic.com (10/10) Oct 22 2010 http://d.puremagic.com/issues/show_bug.cgi?id=5101
- d-bugmail puremagic.com (15/15) Jan 23 2013 http://d.puremagic.com/issues/show_bug.cgi?id=5101
- d-bugmail puremagic.com (7/8) Jan 23 2013 http://d.puremagic.com/issues/show_bug.cgi?id=5101
http://d.puremagic.com/issues/show_bug.cgi?id=5101 Summary: Poorly formed error against non-const template on const object Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: Jesse.K.Phillips+D gmail.com CC: Jesse.K.Phillips+D gmail.com 09:18:10 PDT --- The program below fails to compile because the MyClass.get template method is not const. But this report is on the error message returned: .\templateconst.d(10): Error: function std.variant.VariantN!(maxSize).VariantN.g et!(double).get () is not callable using argument types () I would expect it to complain that the call was not to a const method on a const object. void main() { MyClass a; test(a); } void test(const MyClass c) { auto b = c.get!double; } class MyClass { real pi = 3.14; T get(T)() { return cast(T) pi; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 22 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5101 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs eml.cc See also bug 4947 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 22 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5101 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |DUPLICATE 17:25:36 PST --- Add parens to the call and you'll get this in 2.061: test.d(7): Error: mutable method test.MyClass.get!(double).get is not callable using a const object *** This issue has been marked as a duplicate of issue 4947 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 23 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5101 17:26:13 PST ---Add parens to the call and you'll get this in 2.061:Sorry, I meant 2.062 git-head. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 23 2013