Skip to content

Commit 834ef2c

Browse files
committed
Renamed fieldNumber to tupleIndex in AST & Sema
1 parent ede47ca commit 834ef2c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

include/swift/AST/Expr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4849,7 +4849,7 @@ class KeyPathExpr : public Expr {
48494849

48504850
union {
48514851
unsigned SubscriptSize;
4852-
unsigned FieldNumber;
4852+
unsigned TupleIndex;
48534853
} technicated;
48544854

48554855
Kind KindValue;
@@ -5128,10 +5128,10 @@ class KeyPathExpr : public Expr {
51285128
llvm_unreachable("unhandled kind");
51295129
}
51305130

5131-
unsigned getFieldNumber() const {
5131+
unsigned getTupleIndex() const {
51325132
switch (getKind()) {
51335133
case Kind::TupleElement:
5134-
return technicated.FieldNumber;
5134+
return technicated.TupleIndex;
51355135

51365136
case Kind::Invalid:
51375137
case Kind::UnresolvedProperty:

lib/AST/ASTDumper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2620,7 +2620,7 @@ class PrintExpr : public ExprVisitor<PrintExpr> {
26202620
break;
26212621
case KeyPathExpr::Component::Kind::TupleElement:
26222622
OS << "tuple_element ";
2623-
OS << "#" << component.getFieldNumber();
2623+
OS << "#" << component.getTupleIndex();
26242624
OS << " ";
26252625
break;
26262626
}

lib/AST/Expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2200,7 +2200,7 @@ KeyPathExpr::Component::Component(ASTContext *ctxForCopyingLabels,
22002200
? nullptr : indexHashables.data();
22012201

22022202
if (subscriptLabels.empty()) {
2203-
technicated.FieldNumber = fieldNumber;
2203+
technicated.TupleIndex = fieldNumber;
22042204
} else {
22052205
technicated.SubscriptSize = subscriptLabels.size();
22062206
}

0 commit comments

Comments
 (0)