e33a636317
Tests contained erroneously abstract methods and non-abstract classes that made them not proper Dart 2. Change-Id: Ie04935f3ffd4aa4e9756048de9668c5481553733 Reviewed-on: https://dart-review.googlesource.com/51845 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Commit-Queue: Aske Simon Christensen <askesc@google.com>
34 lines
619 B
Dart
34 lines
619 B
Dart
// Copyright (c) 2018, 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.
|
|
|
|
main() {
|
|
print(new W().native);
|
|
print(new X().native());
|
|
print(new Y2().native);
|
|
print((new Z()..native = "setter").f);
|
|
}
|
|
|
|
class W {
|
|
String native;
|
|
W() : native = "field";
|
|
}
|
|
|
|
class X {
|
|
String native() => "method";
|
|
}
|
|
|
|
abstract class Y1 {
|
|
String get native;
|
|
}
|
|
|
|
class Y2 extends Y1 {
|
|
@override
|
|
String get native => "getter";
|
|
}
|
|
|
|
class Z {
|
|
set native(String s) => f = s;
|
|
String f;
|
|
}
|