January 12, 2012 [Issue 7276] New: ambugious method call with shared / const / immutable | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=7276 Summary: ambugious method call with shared / const / immutable Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: code@benjamin-thaut.de --- Comment #0 from Benjamin Thaut <code@benjamin-thaut.de> 2012-01-11 22:50:47 PST --- Repro case: class Repro { int data() { return 0; } int data() const { return 1; } int data() shared { return 2; } int data() immutable { return 3; } int opSlice() { return data(); } int opSlice() const { return data(); } int opSlice() shared { return data(); } int opSlice() immutable { return data(); } } The calls inside opSlice are ambugious accodring to the compiler. If you replace the call with data() with this.data() everything works fine. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 12, 2012 [Issue 7276] ambugious method call with shared / const / immutable | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Thaut | http://d.puremagic.com/issues/show_bug.cgi?id=7276 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-01-11 23:07:19 PST --- This is same as bug 3733. And I've posted a patch to fix them. *** This issue has been marked as a duplicate of issue 3733 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation