mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
fix Issue 10254 - Purity correctness is broken with constructor
This commit is contained in:
parent
bf71d1e067
commit
92bef24f2f
6 changed files with 29 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue