[dart2js] Fix nullability of return type of RegExpMatch.namedGroup.

Change-Id: Iebc08099c67f498b6aa00020acd0b9a9b3e4cc45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159100
Auto-Submit: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
This commit is contained in:
Mayank Patke 2020-08-18 20:54:00 +00:00 committed by commit-bot@chromium.org
parent da2bff9c96
commit a6ff7e0947

View file

@ -208,7 +208,7 @@ class _MatchImplementation implements RegExpMatch {
return out;
}
String namedGroup(String name) {
String? namedGroup(String name) {
var groups = JS('Object|Null', '#.groups', _match);
if (groups != null) {
var result = JS('String|Null', '#[#]', groups, name);