google / google/closure-compiler
Subtype property declaration not being picked up in supertype (even with strictMissingProperties off)
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
Running with --jscomp_error=missingProperties --jscomp_off=strictMissingProperties
```
/** @typedef {{name: string}} */
let Action;
/**
* @param {!Array} ids
* @return {!Action}
*/
function setSearchResults(ids) {
return {
name: 'finish-search',
results: ids,
};
}
/**
* @param {Action} action
* @return {Array}
*/
function startSearch(action) {
return action.results;
};
```
In version Version: 1.0-SNAPSHOT Built on: 2018-04-09 12:37, this fails with
```
ERROR - Property results never defined on action
return action.results;
^^^^^^^
1 error(s), 0 warning(s), 87.5% typed
```
Whereas running with Version: 1.0-SNAPSHOT Built on: 2017-07-28 18:20 passes cleanly.
Contributor guide
Assessment
This issue has not been assessed yet.