dart-sdk/tests/language_2/implicit_downcast_during_not_test.dart
Paul Berry 6786f1944a Insert implicit downcasts for the operands of "not" expressions.
Tests that have begun failing due to this change are marked with a
reference to issue #31402.

Change-Id: I3d29a1058af5ba43bc2868d85de1e9d87b666ee2
Reviewed-on: https://dart-review.googlesource.com/23080
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-11-22 17:55:27 +00:00

15 lines
372 B
Dart

// Copyright (c) 2017, 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";
void main() {
Object b = true;
!b; // No error
b = new Object();
Expect.throwsTypeError(() {
!b;
});
}