You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varMultimap=function(){/** @type {!Map.<K, !Set.<!V>>} */this._map=newMap();};/** * @param {K} key the key ok * @returns {Set<V>} the value ok */Multimap.prototype.get=function(key){returnthis._map.get(key)||newSet();}
Expected behavior:
No errors, and Multimap<K,V>.get: (key: K) => Set<V>
Actual behavior:
K and V in @param {K} and @returns {Set<V>} are not found and get: (key: any) => any.
Works fine if Multimap is declared as function Multimap ....
Should work with prototype assignments too, eg Multimap.prototype = { get() { ... } }. Discovered while fixing #24230