blob: c5a1e965774ef3ce58c1878ba739bffd9254ee9b [file] [log] [blame]
// Copyright (c) 2019, 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.
// SharedOptions=--enable-experiment=control-flow-collections
import 'package:expect/expect.dart';
void main() {
bool nullBool = null;
Expect.throwsAssertionError(() => <int>[if (nullBool) 1]);
Expect.throwsAssertionError(() => <int, int>{if (nullBool) 1: 1});
Expect.throwsAssertionError(() => <int>{if (nullBool) 1});
}