[Issue 11458] New: initialization of a custom type(using alias this) broken in dmd 2.064.2
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 6 19:18:13 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11458
Summary: initialization of a custom type(using alias this)
broken in dmd 2.064.2
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: burg.basile at yahoo.com
--- Comment #0 from burg.basile at yahoo.com 2013-11-06 19:18:09 PST ---
regression from dmd 2.063.2 to 2.064.2, initialization of a custom type using
alias this.
example:
--------
struct myType{int _field; alias _field this;}
struct myStruct
{
private:
myType dt;
public:
this (string param)
{
dt = 0;
}
}
void main(string[] args)
{
auto MyStruct = myStruct("broken");
}
outputs:
--------
file.d(11): Error: cannot implicitly convert expression (0) of type int to
myType
other:
------
verified on Win x86, Linux X86_64.
--
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