Files
sdk/tests/language_2/implicit_downcast_during_do_test.dart
T
Paul Berry 501872471c Insert implicit downcasts for the conditions of do statements.
Change-Id: I8bfffa0796775434cea767ec9ad13cf5697812d2
Reviewed-on: https://dart-review.googlesource.com/23140
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-11-22 21:47:14 +00:00

15 lines
399 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 = false;
do {} while (b); // No error
b = new Object();
Expect.throwsTypeError(() {
do {} while (b);
});
}