Open
Description
/** @constructor @template T */
function EventType(){}
/**
* @param {string|!EventType<boolean|number>} a
* @param {!EventType<boolean>} b
* @return {boolean}
*/
function compare(a, b) {
return a === b;
}
input0:10: WARNING - condition always evaluates to false
left : (EventType<(boolean|number)>|string)
right: EventType<boolean>
return a === b;
^
The (obviously-incorrect) error only happens if both |
s are present.