blob: d99c4a16ac04dee14b61bcc7ca7feaeec2855014 [file] [log] [blame] [edit]
// Copyright (c) 2025, 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.
import 'package:expect/expect.dart';
import 'package:reload_test/reload_test_utils.dart';
// Tests reload succeeds when super getter are updated.
class Bar {
method() {
return 100;
}
}
class Foo extends Bar {
get tearoff => super.method;
}
Future<void> main() async {
var tearoff = Foo().tearoff;
Expect.equals(42, tearoff());
await hotReload();
Expect.equals(100, tearoff());
}
/** DIFF **/
/*
class Bar {
method() {
- return 42;
+ return 100;
}
}
*/