Files
sdk/pkg/front_end/testcases/general/initialization_errors.dart
Ahmed Ashour 5fe480b788 Fix typos
Fix #49864

TEST=ci

Change-Id: I9a7e06d604cd0b4f56f2ac229ab3fc9f01cb9d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-16 19:35:00 +00:00

105 lines
1.5 KiB
Dart

// Copyright (c) 2020, 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 A {
int x;
A()
: this.x = 41,
this.x = 42 {}
}
class B {
final int x;
B()
: this.x = 41,
this.x = 42 {}
}
class C {
final int x = 2;
C()
: this.x = 41,
this.x = 42 {}
}
class D {
final int x;
final int y;
D()
: this.x = 41,
this.named(),
this.y = 42 {}
D.named()
: this.x = 41,
this.y = 42 {}
}
class E {
final int x;
final int y;
E()
: this.named(),
this.x = 1,
this.y = 2 {}
E.named()
: this.x = 41,
this.y = 42 {}
E.named2()
: this.x = 1,
this.named(),
this.y = 2;
E.named3()
: super(),
this.named(),
this.x = 1,
this.y = 2;
E.named4()
: this.x = 1,
this.y = 2,
this.named();
E.named5()
: assert(true),
this.named();
E.named6()
: this.named(),
assert(true);
}
class F {
F()
: this.named(),
super() {}
F.named() {}
}
class G {
G()
: super(),
this.named(),
super() {}
G.named() {}
}
class H {
H()
: this.named(),
this.named();
H.named() {}
}
class I {
I()
: super(),
super() {}
}
class J {
int x;
J()
: super(),
this.x = 42 {}
}
main() {}