[PowerAssert] Find the earliest starting offset for receiver expression
Calls of infix functions have a start offset which doesn't include the receiver. Property accessors have a start offset at the start of the property name and do not include their receiver expression. This combination can cause problems when the entire expression needs to be displayed, including the entirety of a complex receiver. Make sure to navigate expressions to find their earliest starting offset and use that instead. ^KT-65810 Fixed
This commit is contained in:
+5
-5
@@ -1,6 +1,6 @@
|
||||
wrapper mustEqual "world".length
|
||||
| | |
|
||||
| | 5
|
||||
| Wrapper
|
||||
Holder(wrapper=Wrapper)
|
||||
Complex.holder.wrapper mustEqual "world".length
|
||||
| | | |
|
||||
| | | 5
|
||||
| | Wrapper
|
||||
| Holder(wrapper=Wrapper)
|
||||
Complex
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
wrapper.mustEqual("world".length)
|
||||
| | |
|
||||
| | 5
|
||||
| Wrapper
|
||||
Holder(wrapper=Wrapper)
|
||||
Complex.holder.wrapper.mustEqual("world".length)
|
||||
| | | |
|
||||
| | | 5
|
||||
| | Wrapper
|
||||
| Holder(wrapper=Wrapper)
|
||||
Complex
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
length mustEqual "world".length
|
||||
| |
|
||||
| 5
|
||||
3
|
||||
ell
|
||||
"hello".substring(1, 4).length mustEqual "world".length
|
||||
| | |
|
||||
| | 5
|
||||
| 3
|
||||
ell
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
length.mustEqual("world".length)
|
||||
| |
|
||||
| 5
|
||||
3
|
||||
ell
|
||||
"hello".substring(1, 4).length.mustEqual("world".length)
|
||||
| | |
|
||||
| | 5
|
||||
| 3
|
||||
ell
|
||||
Reference in New Issue
Block a user