[Issue 11694] New: std.traits.SetFunctionAttributes does not conserve constness

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 5 18:22:20 PST 2013


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

           Summary: std.traits.SetFunctionAttributes does not conserve
                    constness
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: ellery-newcomer at utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2013-12-05 18:22:15 PST ---
the code:
import std.traits;

class Z {
    string a() immutable {
        return " 1";
    }
}

pragma(msg ,typeof(&Z.a));
pragma(msg, SetFunctionAttributes!(typeof(&Z.a),
functionLinkage!(typeof(&Z.a)), functionAttributes!(typeof(&Z.a))));

void main() {}

prints out

string function() immutable
string function()

rather than the expected

string function() immutable
string function() immutable

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