mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:21:18 +00:00
5ce5811216
Change-Id: I213617cb4ea1a5c29f8a6a56f54792c59cc4e132 Reviewed-on: https://dart-review.googlesource.com/23221 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
15 lines
419 B
Dart
15 lines
419 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;
|
|
for (int i = 0; b; i++) {} // No error
|
|
b = new Object();
|
|
Expect.throwsTypeError(() {
|
|
for (int i = 0; b; i++) {}
|
|
});
|
|
}
|