File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -951,8 +951,11 @@ class TapExpr : public Expr {
951
951
BraceStmt * getBody () const { return Body; }
952
952
void setBody (BraceStmt * b) { Body = b; }
953
953
954
- SourceLoc getLoc () const { return SourceLoc (); }
955
- SourceRange getSourceRange () const { return SourceRange (); }
954
+ SourceLoc getLoc () const { return SubExpr ? SubExpr->getLoc () : SourceLoc (); }
955
+
956
+ SourceRange getSourceRange () const {
957
+ return SubExpr ? SubExpr->getSourceRange () : SourceRange ();
958
+ }
956
959
957
960
static bool classof (const Expr *E) {
958
961
return E->getKind () == ExprKind::Tap;
Original file line number Diff line number Diff line change
1
+ func test( x: Int , y: Int ) {
2
+ let z = " x = \( x) , y = \( y) "
3
+ print ( z)
4
+ }
5
+
6
+ // RUN: %target-swift-ide-test -range -pos=2:1 -end-pos 4:1 -source-filename %s | %FileCheck %s -check-prefix=CHECK-PARAMS
7
+
8
+ // CHECK-PARAMS: <Referenced>x</Referenced><Type>Int</Type>
9
+ // CHECK-PARAMS: <Referenced>y</Referenced><Type>Int</Type>
You can’t perform that action at this time.
0 commit comments