Files
sdk/pkg/front_end/testcases/general/function_call2.dart
Johnni Winther 70730ad62f [cfe] Avoid stack overflow on getter/field invocation
Change-Id: Id627378c289708c8bf7fe551ad9b6c512aafe226
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213501
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-16 07:16:44 +00:00

27 lines
521 B
Dart

// Copyright (c) 2021, 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 _Closure1 {
void Function() get call => () {};
}
class _Closure2 {
final void Function() call;
_Closure2(this.call);
}
test(_Closure1 foo, _Closure2 bar) {
foo();
bar();
}
late _Closure1 closure1;
late _Closure2 closure2;
var field1 = closure1();
var field2 = closure2();
main() {}