"/** @constructor \n * @param {*} var_args */ " +
"function Function(var_args) {}" +
"/** @type {!Function} */ Function.prototype.apply;",
"var f = new Function();", null);
ObjectType f = (ObjectType) globalScope.getVar("f").getType();
// The type of apply() on a function instance is resolved dynamically,
// since apply varies with the type of the function it's called on.
assertEquals(
"function (?=, (Object|null)=): ?",
f.getPropertyType("apply").toString());
// The type of apply() on the function prototype just takes what it was
// declared with.
FunctionType func = (FunctionType) globalScope.getVar("Function").getType();
assertEquals("Function",