c031e73df0
This in preparation for enabling all bleeding edge experimental features in testcases/general to get early feedback on how new features affect existing code. Change-Id: I1618e9b0401b3f3163c147e6a22c5895d4a5486e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234840 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
30 lines
572 B
Dart
30 lines
572 B
Dart
// Copyright (c) 2016, 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 {
|
|
final int x;
|
|
final int y;
|
|
A(this.y) : x = 42;
|
|
method() {
|
|
print("A.method x: $x y: $y");
|
|
print(this);
|
|
print(this.runtimeType);
|
|
}
|
|
}
|
|
|
|
class B extends A {
|
|
B(x) : super(x);
|
|
method() {
|
|
print("B.method x: $x y: $y");
|
|
super.method();
|
|
}
|
|
}
|
|
|
|
main() {
|
|
A a = new A(87);
|
|
B b = new B(117);
|
|
a.method();
|
|
b.method();
|
|
}
|