Files
sdk/tests/language_2/static/setter_conflicts_test.dart
T
Robert Nystrom fc1b1ecc71 Move files under language_2 into subdirectories.
Change-Id: Idbcc965a27e9ffeedf5e0a1068b019de4193070f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127745
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-12-11 19:18:00 +00:00

27 lines
847 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 C {
static set foo(int x) {}
int foo(int x) => x; //# 01: compile-time error
static int foo(int x) => x; //# 02: compile-time error
int foo = 3; //# 03: compile-time error
final int foo = 4; //# 04: compile-time error
static int foo = 5; //# 05: compile-time error
static final int foo = 6; //# 06: ok
int get foo => 7; //# 07: compile-time error
static int get foo => 8; //# 08: ok
set foo(int x) {} //# 09: compile-time error
static set foo(int x) {} //# 10: compile-time error
C.foo(int x) {} //# 11: compile-time error
factory C.foo(int x) => null; //# 12: compile-time error
}
main() {}