Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
April 17, 2011 [Issue 5851] New: Ambiguous alias this accepted. | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=5851 Summary: Ambiguous alias this accepted. Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: blood.of.life@gmail.com --- Comment #0 from Bernard Helyer <blood.of.life@gmail.com> 2011-04-17 06:55:06 PDT --- import std.stdio; class Foo { this() { o = new Object(); } Object o; alias o this; override string toString() { return "Foo"; } } void foo(Object o) { writeln(o); } void main() { foo(new Foo()); } The code compiles, and prints "Foo". After discussing with Andrei, I believe this code is an error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 17, 2011 [Issue 5851] Ambiguous alias this accepted. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bernard Helyer | http://d.puremagic.com/issues/show_bug.cgi?id=5851 Andrei Alexandrescu <andrei@metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrei@metalanguage.com --- Comment #1 from Andrei Alexandrescu <andrei@metalanguage.com> 2011-04-17 06:56:37 PDT --- Yah, it's a simple case of unreachable code - the alias this would never ever get a chance. This needs to be rejected. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 01, 2012 [Issue 5851] Ambiguous alias this accepted. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bernard Helyer | http://d.puremagic.com/issues/show_bug.cgi?id=5851 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |yebblies@gmail.com Platform|Other |All AssignedTo|nobody@puremagic.com |yebblies@gmail.com OS/Version|Linux |All --- Comment #2 from yebblies <yebblies@gmail.com> 2012-02-01 20:35:31 EST --- https://github.com/D-Programming-Language/dmd/pull/676 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 17, 2012 [Issue 5851] Ambiguous alias this accepted. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bernard Helyer | http://d.puremagic.com/issues/show_bug.cgi?id=5851 --- Comment #3 from github-bugzilla@puremagic.com 2012-07-17 01:32:59 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/51106f05fe3cf3abd2650ddd316eaaeedafc9fc6 Issue 5851 - Ambiguous alias this accepted Disallow alias this when the aggregate type implicitly converts to the aliased type. Fixes issue 5851. https://github.com/D-Programming-Language/dmd/commit/bc83600d34f6f7d5c5effdaa3c9ed635701b6953 Merge pull request #676 from yebblies/issue5851 Issue 5851 - Ambiguous alias this accepted -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 18, 2012 [Issue 5851] Ambiguous alias this accepted. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bernard Helyer | http://d.puremagic.com/issues/show_bug.cgi?id=5851 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug@yahoo.com.au Resolution| |FIXED -- 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