// Copyright (c) 2019, 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.

// SharedOptions=--enable-experiment=extension-methods

// It is an error to have a setter and a getter in an extension where
// the return type of the getter is not assignable to the argument type
// of the setter.
extension E1 on int {
  static int get property => 1;
  //     ^^
  // [analyzer] unspecified
  // [cfe] unspecified
  static void set property(String value) {}
  //                       ^^
  // [analyzer] unspecified
  // [cfe] unspecified
  int get property2 => 1;
  //  ^^
  // [analyzer] unspecified
  // [cfe] unspecified
  void set property2(String x) {}
  //                 ^^
  // [analyzer] unspecified
  // [cfe] unspecified
}

void main() {}
// Copyright (c) 2019, 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.

// SharedOptions=--enable-experiment=extension-methods

// It is an error to have a setter and a getter in an extension where
// the return type of the getter is not assignable to the argument type
// of the setter.
extension E1 on int {
  static int get property => 1;
  //     ^^
  // [cfe] unspecified
  //             ^^^^^^^^
  // [analyzer] STATIC_WARNING.MISMATCHED_GETTER_AND_SETTER_TYPES
  static void set property(String value) {}
  //                       ^^
  // [cfe] unspecified
  int get property2 => 1;
  //  ^^
  // [cfe] unspecified
  //      ^^^^^^^^^
  // [analyzer] STATIC_WARNING.MISMATCHED_GETTER_AND_SETTER_TYPES
  void set property2(String x) {}
  //                 ^^
  // [cfe] unspecified
}

void main() {}
Update test expectations to match analyzer behavior
Update test expectations to match analyzer behavior

Change-Id: Ifd0528af3099086aee517813e64656dc1eaa2bdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113205
Reviewed-by: Paul Berry <72d414e3a99fb120308437779d51667bcc0984eb@google.com>
Commit-Queue: Brian Wilkerson <1f7641b6b14c52b9163524ab8d9aabff80176f21@google.com>
