Commit 53cb928e authored by fukino's avatar fukino Committed by Commit bot

Suppress misplacedTypeAnnotation to compile cr.defineProperty with annotation.

/** @type {number} */ cr.defineProperty(a, 'c'); doesn't compile because of the warning misplacedTypeAnnotation.
As the warning is from parser, it can not be suppressed by @suppress tag.
So this CL suppress the warning by compile option.

BUG=421562

Review URL: https://codereview.chromium.org/687453007

Cr-Commit-Position: refs/heads/master@{#302223}
parent 85552242
......@@ -32,7 +32,6 @@ class Checker(object):
"--jscomp_error=externsValidation",
"--jscomp_error=globalThis",
"--jscomp_error=invalidCasts",
"--jscomp_error=misplacedTypeAnnotation",
"--jscomp_error=missingProperties",
"--jscomp_error=missingReturn",
"--jscomp_error=nonStandardJsDocs",
......@@ -44,6 +43,9 @@ class Checker(object):
"--jscomp_error=visibility",
# TODO(dbeam): happens when the same file is <include>d multiple times.
"--jscomp_off=duplicate",
# TODO(fukino): happens when cr.defineProperty() has a type annotation.
# Avoiding parse-time warnings needs 2 pass compiling. crbug.com/421562.
"--jscomp_off=misplacedTypeAnnotation",
"--language_in=ECMASCRIPT5_STRICT",
"--summary_detail_level=3",
]
......@@ -129,10 +131,10 @@ class Checker(object):
def _fix_up_error(self, error):
"""Filter out irrelevant errors or fix line numbers.
Args:
error: A Closure compiler error (2 line string with error and source).
Return:
The fixed up erorr string (blank if it should be ignored).
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment