dart-sdk/tests/language/class_override_test.dart
regis@google.com 528a7ce3d9 Complete latest spec changes regarding malformed types (see issue 14006).
Update language tests and mark them as failing in dart2js as appropriate.
Mark a few co19 tests as failing.
Mark a dart2js test as failing due to unresolved types.

Unfortunately, https://codereview.chromium.org/53583003/ was uncomplete and
missed a few mappings of malformed types to dynamic.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29924 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 18:46:13 +00:00

25 lines
584 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.
// It is a static warning if a method m1 overrides a method m2 and has a
// different number of required parameters.
class A {
foo() {}
}
class B extends A {
foo(a) {} /// 00: static type warning
}
main() {
B instance = new B();
try {
instance.foo();
} on NoSuchMethodError catch (error) { /// 00: continued
} finally {
}
print("Success");
}