digitalmars.D.bugs - [Issue 1426] New: const(templated class) allows calling mutable methods
- d-bugmail puremagic.com (20/20) Aug 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1426
- d-bugmail puremagic.com (12/12) Mar 16 2010 http://d.puremagic.com/issues/show_bug.cgi?id=1426
http://d.puremagic.com/issues/show_bug.cgi?id=1426
Summary: const(templated class) allows calling mutable methods
Product: D
Version: 2.003
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: Daniel919 web.de
class Foo(T) {
void bar() {}
}
const(Foo!(int)) foo = new Foo!(int)();
foo.bar();
It's working, but it should fail with:
Error: foo.bar can only be called on a mutable object
--
Aug 17 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1426
Steven Schveighoffer <schveiguy yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |schveiguy yahoo.com
Resolution| |FIXED
20:08:30 PDT ---
Unsure of the version this was fixed, but it works as of 2.041.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 16 2010








d-bugmail puremagic.com