Files
sdk/tests/language/variable/duplicate_field_with_initializer_test.dart
T
Johnni Winther 4948c31b7a [test_runner] Support detection of CFE warnings
+ some test expectation fixes

Change-Id: Ibf0259914960ea25978f2b8e29aa89336e209f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162321
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-15 07:57:31 +00:00

14 lines
413 B
Dart

// Copyright (c) 2018, 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.
class Repeated {
dynamic a = '', b = 'Something';
dynamic b;
// ^
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
// [cfe] 'b' is already declared in this scope.
}
main() {}