fix(compiler-cli): produce diagnostic messages in expression of PrefixNot node. (#33087)

PR Close #33087
This commit is contained in:
Andrius
2019-10-10 19:07:48 +03:00
committed by Miško Hevery
parent f54adf10b5
commit 2ddc851090
2 changed files with 7 additions and 0 deletions

View File

@ -304,6 +304,10 @@ export class AstType implements AstVisitor {
}
visitPrefixNot(ast: PrefixNot) {
// If we are producing diagnostics, visit the children
if (this.diagnostics) {
visitAstChildren(ast, this);
}
// The type of a prefix ! is always boolean.
return this.query.getBuiltinType(BuiltinType.Boolean);
}