mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:27:39 +00:00
9f75d4426e
This is needed because the Record.empty constant isn't implemented yet, to avoid compile-time errors in tests that don't expect any. Change-Id: Ic7e61fb285a65a5809979e4c32b632f73f9e2d88 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260107 Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Bob Nystrom <rnystrom@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
18 lines
698 B
Dart
18 lines
698 B
Dart
// Copyright (c) 2022, 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=records
|
|
|
|
main() {
|
|
(int, int, {/*missing*/}) r1 = (1, 2);
|
|
// ^
|
|
// [analyzer] SYNTACTIC_ERROR.EMPTY_RECORD_TYPE_NAMED_FIELDS_LIST
|
|
// [cfe] Record type named fields list can't be empty.
|
|
|
|
(int /* missing trailing comma */ ) r2 = (1, );
|
|
// ^
|
|
// [analyzer] SYNTACTIC_ERROR.RECORD_TYPE_ONE_POSITIONAL_NO_TRAILING_COMMA
|
|
// [cfe] Record type with one entry requires a trailing comma.
|
|
}
|