Files
sdk/tests/language_2/extension_methods/syntax/extension_methods_test.dart
T
Kevin Moore 407428311f Remove extension method opt-in in many language tests
Change-Id: I277a4f29d39c2c4d2669931b5f4837db65589167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149522
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-05-31 18:46:23 +00:00

20 lines
412 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.
import 'package:expect/expect.dart';
class C {
int get one => 1;
}
extension E on C {
int get two => 2;
}
main() {
C c = C();
var result = c.one + c.two;
Expect.equals(result, 3);
}