[Issue 12160] UDA related regressions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 14 10:44:51 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12160



--- Comment #5 from Kenji Hara <k.hara.pg at gmail.com> 2014-02-14 10:44:48 PST ---
Reduced test case:

alias TypeTuple(T...) = T;

auto before(alias Hook)(string parameter_name)
{
    return 0;
}

template checkUDAs(alias Function, string name)
{
    alias attributes = TypeTuple!(
        __traits(getAttributes, Function)
    );
}

//int foo() { return 42; }  // -> OK

void main()
{
    int foo() { return 42; }    // -> NG

    @before!foo("name1")
    void bar(int name1, double name2) {}

    alias X = checkUDAs!(bar, "name1");
}

-- 
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