Skip to content

Commit f3f75ba

Browse files
committed
Change order of const/mutable in class to enhance test
1 parent 6f93bc8 commit f3f75ba

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/Interop/Cxx/class/method/Inputs/ambiguous_methods.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ struct HasAmbiguousMethods {
77
void ping() { ++mutableMethodsCalledCount; }
88
void ping() const {}
99

10-
// One input
11-
int increment(int a) {
12-
++mutableMethodsCalledCount;
10+
// One input (const first)
11+
int increment(int a) const {
1312
return a + 1;
1413
}
1514

16-
int increment(int a) const {
15+
int increment(int a) {
16+
++mutableMethodsCalledCount;
1717
return a + 1;
1818
}
1919

@@ -37,9 +37,9 @@ struct HasAmbiguousMethods {
3737
a += b;
3838
}
3939

40-
// No input with output
41-
int numberOfMutableMethodsCalled() { return ++mutableMethodsCalledCount; }
40+
// No input with output (const first)
4241
int numberOfMutableMethodsCalled() const { return mutableMethodsCalledCount; }
42+
int numberOfMutableMethodsCalled() { return ++mutableMethodsCalledCount; }
4343

4444
private:
4545
int mutableMethodsCalledCount = 0;

test/Interop/Cxx/class/method/ambiguous-methods-module-interface.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
// CHECK: mutating func pingMutating()
44
// CHECK: func ping()
55

6-
// CHECK: mutating func incrementMutating(_ a: Int32) -> Int32
76
// CHECK: func increment(_ a: Int32) -> Int32
7+
// CHECK: mutating func incrementMutating(_ a: Int32) -> Int32
88

99
// CHECK: mutating func incrementMutating(_ a: Int32, _ b: Int32, _ c: inout Int32)
1010
// CHECK: func increment(_ a: Int32, _ b: Int32, _ c: inout Int32)
1111

1212
// CHECK: mutating func incrementMutating(_ a: inout Int32, _ b: Int32)
1313
// CHECK: func increment(_ a: inout Int32, _ b: Int32)
1414

15+
// CHECK: func numberOfMutableMethodsCalled() -> Int32
1516
// CHECK: mutating func numberOfMutableMethodsCalledMutating() -> Int32
16-
// CHECK: func numberOfMutableMethodsCalled() -> Int32

0 commit comments

Comments
 (0)