mirror of https://github.com/deavmi/niknaks
parent
c5c7a02ac0
commit
fa80d17cd2
|
@ -279,7 +279,8 @@ public struct Registry
|
|||
return potEntry;
|
||||
}
|
||||
|
||||
public ConfigEntry* opBinary(string op, string)(string name)
|
||||
|
||||
public ConfigEntry* opBinaryRight(string op)(string name)
|
||||
if(op == "in")
|
||||
{
|
||||
return getEntry0(name);
|
||||
|
@ -489,6 +490,8 @@ unittest
|
|||
reg["age"] = 25;
|
||||
assert(cast(int)reg["age"] == 25);
|
||||
|
||||
ConfigEntry* ageEntry = "age" in reg;
|
||||
|
||||
// Should not be able to set entry it not yet existent
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue