expr, "source.js", empty);
assertTrue(type instanceof UnionType);
assertTrue(type.isUnknownType());
assertEquals("(foo|null)", type.toString());
assertNull("Unexpected warnings: " + reporter.warnings(),
reporter.warnings());
type = immediateRegistry.createFromTypeNodes(
expr, "source.js", empty);
assertTrue(type instanceof UnknownType);
assertEquals("Expected warnings", 1, reporter.warnings().size());