ac14ef2fcc
This in preparation for enabling all bleeding edge experimental features in testcases/general to get early feedback on how new features affect existing code. Change-Id: I5b23b8e6eca4f73661766cab48c6fe94ebc5cce7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235781 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
17 lines
432 B
Dart
17 lines
432 B
Dart
// Copyright (c) 2017, 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 Foo {
|
|
List list = [1, 2, 3];
|
|
set first(x) => list[0] = x;
|
|
operator []=(x, y) => list[x] = y;
|
|
void clear() => list.clear();
|
|
}
|
|
|
|
main() {
|
|
new Foo().first = 4;
|
|
new Foo()[3] = 4;
|
|
new Foo().clear();
|
|
}
|