blob: a3e0a9070d196372340042410b94ffb866387969 [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 Effectively, each super parameters, super.p:
///
/// Introduces a final variable p with the parameter’s name, just like this.p
/// does, only in scope in the initializer list.
///
/// @description Check that the super parameter introduces a final variable with
/// the parameter's name
/// @author sgrekhov@unipro.ru
class S {
int s;
S(int x) : s = ++x;
}
class C extends S {
int c;
C(int x, [super.x = 0]) : c = x;
// ^
// [analyzer] unspecified
// [cfe] unspecified
}
main() {
print(C);
}