Files
sdk/tests/language_2/spread_collections/syntax_error_test.dart
T
Kevin Millikin 64b0ce5b58 Remove UI as code experimental flags from our tests
The features control-flow-collections and spread-collections have been
shipped and it is no longer necessary for tests to explicitly opt into
them.

Change-Id: I074b91d12e4e485ee4a64147947bb1113899ecdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104780
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-06-06 13:17:49 +00:00

21 lines
713 B
Dart

// 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.
void main() {
// Spread nothing.
var _ = [...]; //# 00: syntax error
var _ = [...?]; //# 01: syntax error
var _ = [...,]; //# 02: syntax error
// Use `...` in map entry.
var _ = {"a": ...{}}; //# 03: syntax error
var _ = {...{}: "b"}; //# 04: syntax error
var _ = {"a": ...?{}}; //# 05: syntax error
var _ = {...?{}: "b"}; //# 06: syntax error
// Treats `...?` as single token.
var _ = [... ?null]; //# 07: syntax error
var _ = {1: 2, ... ?null}; //# 08: syntax error
}