mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:27:17 +00:00
6f4bc6a9be
Bug: http://drtbug.com/31767 Change-Id: I25a877244d588b642c1c027caee381cfa847c07d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120644 Commit-Queue: Lasse R.H. Nielsen <lrn@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
24 lines
759 B
Dart
24 lines
759 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 "mixin_constructor_parameter_forwarding_test.dart";
|
|
|
|
// A private class that the mixin application cannot access syntactically,
|
|
// yet it needs an instance of it for the default value.
|
|
class _Private {
|
|
const _Private();
|
|
}
|
|
|
|
class B2<T> implements B<T> {
|
|
final T x;
|
|
final Object y;
|
|
const B2(T x, [Object y = const _Private()])
|
|
: x = x,
|
|
y = y;
|
|
}
|
|
|
|
// Leaking the constant value in a non-constant way which cannot be used
|
|
// for the default value of the mixin application.
|
|
Object get privateValue => const _Private();
|