blob: 4ff8e686237c3175e8cefe77e5a595528e2fdee4 [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 isGetter
/// Whether the invocation was a getter call. If so, both types of arguments is
/// empty.
/// @description Checks that isGetter returns false for setters and instance
/// method invocations.
/// @author ilya
import "../../../Utils/expect.dart";
class D {
method(x, y, z) {}
get getOnly {}
set setOnly (x) {}
noSuchMethod(Invocation i) {
Expect.isFalse(i.isGetter);
}
}
class C extends D {
noSuchMethod(Invocation i) {
Expect.isFalse(i.isGetter);
}
var d;
C() : d = new D();
}
test(dynamic x) {
var y = new C();
x + y;
- x;
x.foo();
x.method();
x.bar = 1;
x.getOnly = 1;
x.d();
}
main() {
test(new C());
}