google / google/closure-compiler
spurious type errors involving maps
Open
OTI
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
When compiling this code (with --language_in=ES6_STRICT)...
``` js
/**
* @param {Map} map
* @template KEY, VALUE
*/
const foo = function(map) {
};
/**
* @param {Map} map
*/
const bar = function(map) {
foo(map);
};
```
...I get this warning:
```
test.js:12: WARNING - actual parameter 1 of foo does not match formal parameter
found : (Map|null)
required: (Map<(number|string),(number|string)>|null)
foo(map);
```
Contributor guide
Assessment
This issue has not been assessed yet.