blob: 78cbd95133c8a0674bc2f284e1bf620a10d3ce9f [file] [log] [blame]
// 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.
/// @assertion It’s a compile-time error if a constructor has a named
/// super-parameter with name n and a super-constructor invocation with a named
/// argument with name n.
///
/// @description Check that it is a compile-time error if a constructor has a
/// named super-parameter with name n and a super-constructor invocation with a
/// named argument with name n.
/// @author sgrekhov@unipro.ru
class S {
int? n;
S({int? n}) : this.n = n;
}
class C extends S {
int i1;
C(this.i1, {super.n}): super();
// ^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}
main() {
C(1, n: 2);
}