Files
sdk/pkg/front_end/testcases/general/issue45101/patch_lib.dart
T
Dmitry Stefantsov 9aa2b61fee [cfe] Propagate isRedirectingFactoryConstructor flag when patching
Bug: https://github.com/dart-lang/sdk/issues/45101
Change-Id: Id0c9f3ce319111a79b2085f44a4e4243dbe6597a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187440
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-02-26 10:51:36 +00:00

22 lines
502 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.
// @dart=2.9
// ignore: import_internal_library
import 'dart:_internal';
@patch
@pragma("vm:entry-point")
class Array<T> {
// ...
@patch
const factory Array(int foo) = _ArraySize<T>;
}
class _ArraySize<T> implements Array<T> {
final int foo;
const _ArraySize(this.foo);
}