blob: 922f4f9b85f27c1368c1f1ad2d8f2910fa620c34 [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 Postfix expressions invoke the postfix operators on objects.
/// postfixExpression:
/// assignableExpression postfixOperator |
/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator)))
/// ;
/// postfixOperator:
/// incrementOperator
/// ;
/// selector:
/// assignableSelector |
/// arguments
/// ;
/// incrementOperator:
/// '++' |
/// '--'
/// ;
/// A postfix expression is either a primary expression, a function, method or
/// getter invocation, or an invocation of a postfix operator on an expression e.
/// @description Checks that a reference to a class declaration cannot be used
/// with postfixOperator without a compile error.
/// @author msyabro
/// @reviewer kaigorodov
/// @reviewer rodionov
class A {}
main() {
A++;
//^
// [analyzer] unspecified
// [cfe] unspecified
}