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

           Summary: Reserve the keyword "yield"
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2014-01-07 18:38:02 PST ---
I suggest to reserve the keyword "yield" for future usage (just like the
keyword "macro", "cent", "ucent"). This will avoid backward compatibility
problems with D code that uses variable names "yield" today.

See Issue 5660 for info on "yield".


Today code that uses "yield" should give an explicit error message like this:

test.d(2): Error: yield not implemented


And this should compile:

void main() {
    static assert(!__traits(compiles, { yield(int) foo() { yield 1; }}));
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to