comparison src/SettingsLoader.d @ 831:c60bd5cd61da

Fixed code that got broken by changes in dmd.1.033.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sun, 20 Jul 2008 01:23:43 +0200
parents 525ee3f848d9
children 4063da6f3edd
comparison
equal deleted inserted replaced
830:aad6aeb5d12b 831:c60bd5cd61da
55 auto value = var.to!(Variable).value; 55 auto value = var.to!(Variable).value;
56 if (!value) 56 if (!value)
57 return error(t, "'{}' variable has no value set", name), T.init; 57 return error(t, "'{}' variable has no value set", name), T.init;
58 T val = value.Is!(T); // Try casting to T. 58 T val = value.Is!(T); // Try casting to T.
59 if (!val) 59 if (!val)
60 error(value.begin, "the value of '{}' is not of type {}", name, typeof(T).stringof); 60 error(value.begin, "the value of '{}' is not of type {}", name, T.stringof);
61 return val; 61 return val;
62 } 62 }
63 63
64 T castTo(T)(Node n) 64 T castTo(T)(Node n)
65 { 65 {