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 @@ -988,8 +988,11 @@ class TapExpr : public Expr {
988
988
BraceStmt * getBody () const { return Body; }
989
989
void setBody (BraceStmt * b) { Body = b; }
990
990
991
- SourceLoc getLoc () const { return SourceLoc (); }
992
- SourceRange getSourceRange () const { return SourceRange (); }
991
+ SourceLoc getLoc () const { return SubExpr ? SubExpr->getLoc () : SourceLoc (); }
992
+
993
+ SourceRange getSourceRange () const {
994
+ return SubExpr ? SubExpr->getSourceRange () : SourceRange ();
995
+ }
993
996
994
997
static bool classof (const Expr *E) {
995
998
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