dart-sdk/tests/language/constructor/constructor12_weak_test.dart
Nicholas Shahan 1accf661e2 [tests] Break test into weak and strong versions
In weak mode A<dynamic> is a subtype of A<Object>. Break out this
expectation into separate files for weak and strong modes.

Change-Id: I8d7b10d836eeb4a3221fe51ee7717aa544347b05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144682
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-24 01:03:52 +00:00

19 lines
541 B
Dart

// Copyright (c) 2015, 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.
// Requirements=nnbd-weak
// Copied from constructor12_test.dart to break out a single expectation that
// is different in weak and strong modes.
import "package:expect/expect.dart";
import 'constructor12_lib.dart';
main() {
var a2 = confuse(new A(2));
// Only true in weak mode.
Expect.isTrue(a2 is A<Object>);
}