digitalmars.D.bugs - [Issue 4297] New: Nothrow functions cannot use constant dynamic array
- d-bugmail puremagic.com (31/31) Jun 08 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4297
- d-bugmail puremagic.com (12/12) Nov 03 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4297
http://d.puremagic.com/issues/show_bug.cgi?id=4297
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
AssignedTo: nobody puremagic.com
ReportedBy: rsinfu gmail.com
---
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 test.foo '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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 08 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4297
Don <clugdbug yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |clugdbug yahoo.com.au
Resolution| |FIXED
Fixed svn 736.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 03 2010








d-bugmail puremagic.com