mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:29:48 +00:00
ac9b4aab8d
Follow-up to https://dart-review.googlesource.com/c/sdk/+/190022 Change-Id: Id42336216267dcbf481ae6e111177e6296ea6779 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190881 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
25 lines
992 B
Dart
25 lines
992 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.
|
|
|
|
/// Legacy compound literal syntax that should go away.
|
|
|
|
main() {
|
|
var map = new Map<int>{ "a": 1, "b": 2, "c": 3 };
|
|
// ^^^^^^^
|
|
// [analyzer] SYNTACTIC_ERROR.LITERAL_WITH_CLASS_AND_NEW
|
|
// [cfe] A map literal can't be prefixed by 'new Map'.
|
|
// ^^^^^^
|
|
// [analyzer] COMPILE_TIME_ERROR.MAP_ENTRY_NOT_IN_MAP
|
|
// ^
|
|
// [cfe] Expected ',' before this.
|
|
// ^^^^^^
|
|
// [analyzer] COMPILE_TIME_ERROR.MAP_ENTRY_NOT_IN_MAP
|
|
// ^
|
|
// [cfe] Expected ',' before this.
|
|
// ^^^^^^
|
|
// [analyzer] COMPILE_TIME_ERROR.MAP_ENTRY_NOT_IN_MAP
|
|
// ^
|
|
// [cfe] Expected ',' before this.
|
|
}
|