blob: eb789fa42fe20acd5f302373514b53fbe46fed73 [file] [log] [blame]
// Copyright (c) 2017, 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.
// test w/ `dart test -N avoid_setters_without_getters`
class A {
set x(int x) {} // LINT
}
class B extends A {
@override
set x(int x) {} // OK because it is an inherited setter.
}
class C {
int get x => 0;
}
class D extends C {
set x(int x) {} // OK because has inherited getter.
}
class E {
int get length => 0;
set length (int v) {} // OK
}