www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14874] New: std.traits.functionAttributes does not support

https://issues.dlang.org/show_bug.cgi?id=14874

          Issue ID: 14874
           Summary: std.traits.functionAttributes does not support the new
                    `return` attribute
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: monkeyworks12 hotmail.com

import std.traits;

struct Test
{
    int n;

    ref int getN() return
    {
        return n;
    }
}

void main()
{
        //fails
    assert(functionAttributes!(Test.getN) & FunctionAttribute.return_);
}

--
Aug 05 2015