fix Issue 10254 - Purity correctness is broken with constructor

This commit is contained in:
k-hara 2013-06-06 23:04:42 +09:00
parent bf71d1e067
commit 92bef24f2f
6 changed files with 29 additions and 5 deletions

View file

@ -68,11 +68,13 @@ class Win32Exception : Exception
{
int error;
@safe pure nothrow
this(string message, string fn = __FILE__, size_t ln = __LINE__, Throwable next = null)
{
super(message, fn, ln, next);
}
@safe pure
this(string message, int errnum, string fn = __FILE__, size_t ln = __LINE__, Throwable next = null)
{
super(text(message, " (", errnum, ")"), fn, ln, next);
@ -116,6 +118,7 @@ public:
Params:
message = The message associated with the exception.
*/
@safe pure
this(string message, string fn = __FILE__, size_t ln = __LINE__, Throwable next = null)
{
super(message, fn, ln, next);
@ -128,6 +131,7 @@ public:
message = The message associated with the exception.
error = The Win32 error number associated with the exception.
*/
@safe pure
this(string message, int error, string fn = __FILE__, size_t ln = __LINE__, Throwable next = null)
{
super(message, error, fn, ln, next);
@ -782,12 +786,14 @@ private void regProcessNthValue(HKEY hkey, scope void delegate(scope LONG delega
*/
class Key
{
@safe pure nothrow
invariant()
{
assert(m_hkey !is null);
}
private:
@safe pure nothrow
this(HKEY hkey, string name, bool created)
in
{
@ -1147,12 +1153,14 @@ private:
*/
class Value
{
@safe pure nothrow
invariant()
{
assert(m_key !is null);
}
private:
@safe pure nothrow
this(Key key, string name, REG_VALUE_TYPE type)
in
{
@ -1363,12 +1371,14 @@ foreach (string subkeyName; key.keyNames)
*/
class KeyNameSequence
{
@safe pure nothrow
invariant()
{
assert(m_key !is null);
}
private:
@safe pure nothrow
this(Key key)
{
m_key = key;
@ -1458,12 +1468,14 @@ foreach (Key subkey; key.keys)
*/
class KeySequence
{
@safe pure nothrow
invariant()
{
assert(m_key !is null);
}
private:
@safe pure nothrow
this(Key key)
{
m_key = key;
@ -1565,12 +1577,14 @@ foreach (string valueName; key.valueNames)
*/
class ValueNameSequence
{
@safe pure nothrow
invariant()
{
assert(m_key !is null);
}
private:
@safe pure nothrow
this(Key key)
{
m_key = key;
@ -1659,12 +1673,14 @@ foreach (Value value; key.values)
*/
class ValueSequence
{
@safe pure nothrow
invariant()
{
assert(m_key !is null);
}
private:
@safe pure nothrow
this(Key key)
{
m_key = key;