dart-sdk/tests/language/bad_override_test.dart
regis@google.com 9eb12ad303 Implement updated method overriding rules in the vm (issue 11495).
Introduce --error-on-bad-override flag and use it when generating snapshots.
Fix signature checking when patching methods.
Fix errors in patch files.
Fix receiver type of constructors.
Fix finalization of mixin application typedefs.
Update tests and status files.

R=asiva@google.com

Review URL: https://codereview.chromium.org//22685007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26027 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 20:28:52 +00:00

31 lines
720 B
Dart

// Copyright (c) 2012, 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 Fisk {
get fisk => null;
static /// 01: static type warning
set fisk(x) {}
static /// 02: static type warning
get hest => null;
set hest(x) {}
foo() {}
var field;
method() {}
nullary() {}
}
class Hest extends Fisk {
static foo() {} /// 03: compile-time error
field() {} /// 04: compile-time error
var method; /// 05: compile-time error
nullary(x) {} /// 06: static type warning
}
main() {
new Fisk();
new Hest();
}