Files
sdk/pkg/front_end/testcases/native_as_name.dart
T
Aske Simon Christensen e33a636317 Fixes to frontend tests.
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>
2018-04-20 10:54:59 +00:00

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;
}