[Issue 12339] New: "alais this" not considered for qualified conversion
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 10 12:06:32 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12339
Summary: "alais this" not considered for qualified conversion
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 2014-03-10 12:06:28 PDT ---
I'd expect an implicit "const S" => "S" conversion to work if an "alias this"
call allows it.
//------------
//alias T = int; //OK
alias T = S; //FAIL
static struct S
{
int* p;
T asMutable() const;
alias asMutable this;
}
void main()
{
immutable S s;
T ss = s;
}
//------------
I see this as a needless limitation: The fact that the types match should not
prevent the alias this call from happening.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list