e28d041d45
Change-Id: I2f346ce2ee1cc8b6d6b61d63750b2ae909fdf456 Reviewed-on: https://dart-review.googlesource.com/22602 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
15 lines
386 B
Dart
15 lines
386 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 ? 1 : 2; // No error
|
|
b = new Object();
|
|
Expect.throwsTypeError(() {
|
|
b ? 1 : 2;
|
|
});
|
|
}
|