Summary: Nothrow functions cannot use constant dynamic array
           Product: D
           Version: 2.041
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Shin Fujishiro <> 2010-06-08 15:32:21 PDT 
DMD rejects nothrow functions which use compile-time constant dynamic array for
violating nothrow.

immutable TABLE = [ 1, 2, 3 ];
pragma(msg, typeof(TABLE)); // immutable(int[])

void foo() nothrow
    // Error: function 'foo' is nothrow yet may throw
    const(int)[] tab;
    tab = TABLE;

The error does not occur if TABLE is declared with auto or immutable int[3]
(instead of mere "immutable").

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to