---
cat > test.d << code
static assert({
auto o = new Object;
return typeid(o) is typeid(o); /* line 3 */
}());
code
dmd -c test.d
---
test.d(3): Error: cannot compare typeid(object.Object) at compile time
test.d(4): called from here: (*() => **o is **o)()
test.d(1): while evaluating: static assert((*() => **o is **o)())
---