return builder.build();
}
private void testTTL(JSType expectedType, String ttlExp,
String... expectedWarnings) {
TypeTransformationParser ttlParser = new TypeTransformationParser(ttlExp,
SourceFile.fromCode("[testcode]", ttlExp), errorReporter, 0, 0);
// Run the test if the parsing was successful
if (ttlParser.parseTypeTransformation()) {
Node ast = ttlParser.getTypeTransformationAst();
// Create the scope using the extra definitions
Node extraTypeDefs = compiler.parseTestCode(EXTRA_TYPE_DEFS);
Scope scope = new TypedScopeCreator(compiler).createScope(
extraTypeDefs, null);
// Evaluate the type transformation