3d7ec8aab2
* Improve @template lookup and resilience 1. @template parsing may produce a template tag with a type parameter whose name is the missing identifier. These tags should be skipped in the checker because they receive an error in the parser. 2. The fix in #37819 was incorrect; there's no such thing as a type parameter declared on a variable declaration. Instead, there needs to be a type parameter declared on a jsdoc comment, because that's the scope for tags like `@return` and `@typedef`. There are 3 tests because either fix (1) and (2) fix the first test's failure, but both are required to fix the last two tests' failures. * remove containsParseError call
24 lines
874 B
Plaintext
24 lines
874 B
Plaintext
=== tests/cases/conformance/jsdoc/jsdocOuterTypeParameters1.js ===
|
|
/** @return {T} */
|
|
const dedupingMixin = function(mixin) {};
|
|
>dedupingMixin : Symbol(dedupingMixin, Decl(jsdocOuterTypeParameters1.js, 1, 5))
|
|
>mixin : Symbol(mixin, Decl(jsdocOuterTypeParameters1.js, 1, 31))
|
|
|
|
/** @template {T} */
|
|
const PropertyAccessors = dedupingMixin(() => {
|
|
>PropertyAccessors : Symbol(PropertyAccessors, Decl(jsdocOuterTypeParameters1.js, 4, 5))
|
|
>dedupingMixin : Symbol(dedupingMixin, Decl(jsdocOuterTypeParameters1.js, 1, 5))
|
|
|
|
class Bar {
|
|
>Bar : Symbol(Bar, Decl(jsdocOuterTypeParameters1.js, 4, 47))
|
|
|
|
static bar() { this.prototype.foo(); }
|
|
>bar : Symbol(Bar.bar, Decl(jsdocOuterTypeParameters1.js, 5, 13))
|
|
>this.prototype : Symbol(Bar.prototype)
|
|
>this : Symbol(Bar, Decl(jsdocOuterTypeParameters1.js, 4, 47))
|
|
>prototype : Symbol(Bar.prototype)
|
|
}
|
|
});
|
|
|
|
|