diff --git a/closure/goog/asserts/asserts.js b/closure/goog/asserts/asserts.js index 23663d081b..66578fd5df 100644 --- a/closure/goog/asserts/asserts.js +++ b/closure/goog/asserts/asserts.js @@ -35,6 +35,14 @@ * The compiler will leave in foo() (because its return value is used), * but it will remove bar() because it assumes it does not have side-effects. * + * Additionally, note the compiler will consider the type to be "tightened" for + * all statements after the assertion. For example: + * + * const /** ?Object &#ast;/ value = foo(); + * goog.asserts.assert(value); + * // "value" is of type {!Object} at this point. + * + * * @author agrieve@google.com (Andrew Grieve) */