b704a88aa0
R=ahe@google.com, kustermann@google.com BUG= Review URL: https://codereview.chromium.org//23460006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26772 260f80e4-7a28-3924-810f-c04153c831b5
48 lines
756 B
Dart
48 lines
756 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.
|
|
|
|
foo(a, [b]) {
|
|
}
|
|
|
|
bar(a, {b}) {
|
|
}
|
|
|
|
class A {
|
|
A();
|
|
A.test(a, [b]);
|
|
}
|
|
|
|
class B {
|
|
B()
|
|
: super.test(b: 1) /// 01: runtime error
|
|
;
|
|
}
|
|
|
|
class C extends A {
|
|
C()
|
|
: super.test(b: 1) /// 02: runtime error
|
|
;
|
|
}
|
|
|
|
class D {
|
|
D();
|
|
D.test(a, {b});
|
|
}
|
|
|
|
class E extends D {
|
|
E()
|
|
: super.test(b: 1) /// 05: runtime error
|
|
;
|
|
}
|
|
|
|
main() {
|
|
new A.test(b: 1); /// 00: runtime error
|
|
new B();
|
|
new C();
|
|
new D.test(b: 1); /// 03: runtime error
|
|
new E();
|
|
foo(b: 1); /// 06: runtime error
|
|
bar(b: 1); /// 07: runtime error
|
|
}
|