mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 22:11:19 +00:00
53b730791a
Change-Id: I878a288ac5932de8c83546df91038dcf54cd9039 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231845 Reviewed-by: Lasse Nielsen <lrn@google.com> Commit-Queue: Stephen Adams <sra@google.com>
19 lines
489 B
Dart
19 lines
489 B
Dart
// Copyright (c) 2022, 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.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
// The closurized methods of `null` have working `toString()` methods.
|
|
// See #48322.
|
|
|
|
void main() {
|
|
check(null.toString);
|
|
check(null.noSuchMethod);
|
|
}
|
|
|
|
void check(Object o) {
|
|
final s = o.toString();
|
|
Expect.notEquals("", s);
|
|
}
|