blob: fe945588b7250ec58610259253b28ae38350254c [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.
// @dart = 2.9
/// @assertion An expression of the form op super is equivalent to the method
/// invocation super.op().
/// @description Checks that an expression of the form ~ super is equivalent to
/// the method invocation super.operator~().
/// @author msyabro
/// @reviewer kaigorodov
/// @reviewer rodionov
import '../../../Utils/expect.dart';
class TestException {}
class S {
operator ~() {
throw new TestException();
}
}
class A extends S{
test() {
try {
~super;
Expect.fail("Operator ~ was not called");
} on TestException catch (e) {}
}
}
main() {
A a = new A();
a.test();
}