File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,8 @@ precedencegroup BitwiseShiftPrecedence {
390
390
//===----------------------------------------------------------------------===//
391
391
392
392
// Standard postfix operators.
393
+ postfix operator ++
394
+ postfix operator --
393
395
postfix operator ...
394
396
395
397
// Optional<T> unwrapping operator is built into the compiler as a part of
@@ -398,6 +400,8 @@ postfix operator ...
398
400
// postfix operator !
399
401
400
402
// Standard prefix operators.
403
+ prefix operator ++
404
+ prefix operator --
401
405
prefix operator !
402
406
prefix operator ~
403
407
prefix operator +
Original file line number Diff line number Diff line change
1
+ // RUN: %target-typecheck-verify-swift -swift-version 4
2
+
3
+ // expect-no-diagnostics
4
+
5
+ struct X { }
6
+
7
+ postfix func ++ ( x: X ) -> X { return x }
8
+ prefix func ++ ( x: X ) -> X { return x }
9
+ postfix func -- ( x: X ) -> X { return x }
10
+ prefix func -- ( x: X ) -> X { return x }
You can’t perform that action at this time.
0 commit comments