blob: 0ea1de06036e33d359ac3421e115f0f39be37682 [file] [log] [blame]
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.7
// Requirements=nnbd-weak
import "package:expect/expect.dart";
main() {
// In legacy Dart 2 and null safety weak mode the error handlers can
// return null.
Expect.equals(null, int.parse("foo", onError: (_) => null));
Expect.equals(null, double.parse("foo", (_) => null));
}