Files
sdk/tests/corelib/string_from_environment3_test.dart
T
Robert Nystrom 0906af6d2f Reformat tests/corelib/.
I also regenerated the static error expectations (see #57042 for
context).

Change-Id: Ia0ca22604a0dd422cc265a46845afc43f551fe38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394572
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2024-11-14 13:04:51 +00:00

15 lines
692 B
Dart

// Copyright (c) 2013, 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.
// Formatting can break multitests, so don't format them.
// dart format off
main() {
const String.fromEnvironment('NOT_FOUND', defaultValue: 1); // //# 01: compile-time error
const String.fromEnvironment('NOT_FOUND', defaultValue: true); // //# 02: compile-time error
const String.fromEnvironment(null); // //# 03: compile-time error
const String.fromEnvironment(1); // //# 04: compile-time error
const String.fromEnvironment([]); // //# 05: compile-time error
}