blob: 85bbeeafabddc787844ca09f6c6c94977b88cfa5 [file] [log] [blame]
// Copyright (c) 2011, 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.
/// @assertion final bool isMethod
/// Whether the invocation was a method call.
/// @description Checks that isMethod returns true for instance methods
/// invocations.
/// @author ilya
import "../../../Utils/expect.dart";
class D {
method(x, y, z) {}
noSuchMethod(Invocation i) {
Expect.isTrue(i.isMethod);
}
}
class C extends D {
noSuchMethod(Invocation i) {
Expect.isTrue(i.isMethod);
}
var d;
C() : d = new D();
}
test(dynamic x) {
var y = new C();
x + y;
- x;
x.foo();
x.method();
x.d();
}
main() {
test(new C());
}