6e85f3337a
Change-Id: I1db4125b4469e6a8b6adc5ec6e4dcafc0a26da4a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124680 Reviewed-by: Aske Simon Christensen <askesc@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
20 lines
462 B
Dart
20 lines
462 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.
|
|
|
|
class Class {
|
|
Class method() => this;
|
|
}
|
|
|
|
extension Extension on Class {
|
|
Class extensionMethod() => this;
|
|
}
|
|
|
|
main() {
|
|
Class? c;
|
|
c?..method();
|
|
c?..method()..method();
|
|
c?..extensionMethod();
|
|
c?..extensionMethod()..extensionMethod();
|
|
}
|