From 9781d3dc9f5c81b951083a48e86251962458d76f Mon Sep 17 00:00:00 2001 From: Joshua Litt Date: Thu, 6 Feb 2020 20:41:07 +0000 Subject: [PATCH] Fix minor bug with NNBD and Math.exp This cl simply adds a missing nullcheck to Math.exp Change-Id: I5a5a145b1c60e31d956891c530cba2bb9a718b4a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134761 Reviewed-by: Nicholas Shahan Commit-Queue: Joshua Litt --- sdk_nnbd/lib/_internal/js_dev_runtime/patch/math_patch.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk_nnbd/lib/_internal/js_dev_runtime/patch/math_patch.dart b/sdk_nnbd/lib/_internal/js_dev_runtime/patch/math_patch.dart index 200644c8616..288f66e838d 100644 --- a/sdk_nnbd/lib/_internal/js_dev_runtime/patch/math_patch.dart +++ b/sdk_nnbd/lib/_internal/js_dev_runtime/patch/math_patch.dart @@ -51,7 +51,8 @@ double atan2(@nullCheck num a, @nullCheck num b) => JS('!', r'Math.atan2(#, #)', a, b); @patch -double exp(num x) => JS('!', r'Math.exp(#)', x); +@notNull +double exp(@nullCheck num x) => JS('!', r'Math.exp(#)', x); @patch @notNull