blob: 4d813d294022aed2b4a12dc0e5a8a310ab22da28 [file] [log] [blame]
// Copyright (c) 2020, 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.
// @dart=2.9
int set setter1(_) {} // error
dynamic set setter2(_) {} // error
void set setter3(_) {} // ok
set setter4(_) {} // ok
class Class1 {
int set setter1(_) {} // error
int operator []=(a, b) {} // error
}
class Class2 {
dynamic set setter2(_) {} // error
dynamic operator []=(a, b) {} // error
}
class Class3 {
void set setter3(_) {} // ok
void operator []=(a, b) {} // ok
}
class Class4 {
set setter4(_) {} // ok
operator []=(a, b) {} // ok
}
main() {}