[Issue 19710] New: [Home]
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 28 23:51:28 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19710
Issue ID: 19710
Summary: [Home]
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/
OS: All
Status: NEW
Severity: regression
Priority: P3
Component: dmd
Assignee: nobody at puremagic.com
Reporter: alex at sunopti.com
import std.stdio;
void attribute(string attributeName,T)(ref T x)
{
mixin(
"x." ~ attributeName ~ " = 10;"
);
}
void main()
{
class A
{
int b;
void load()
{
attribute!"b"(this); //error: template
main.attribute cannot deduce function from argument types !("b")(A), candidates
are: attribute!"b"(this);
}
}
auto a = new A;
attribute!"b"(a); //OK.
}
This compiles in gdc 6, but fails in gdc8 and dlang.org web compiler.
--
More information about the Digitalmars-d-bugs
mailing list