test(dynamic x) { switch (x) { case const Foo(1) as Object: break; } }