Merge pull request #9875 from smowton/smowton/fix/charat-naming

Kotlin: Special-case String.charAt naming
This commit is contained in:
Chris Smowton
2022-07-25 16:10:13 +01:00
committed by GitHub
6 changed files with 16 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ reflection.kt:
# 46| 0: [TypeAccess] String
# 47| 5: [BlockStmt] { ... }
# 47| 0: [ReturnStmt] return ...
# 47| 0: [MethodAccess] get(...)
# 47| 0: [MethodAccess] charAt(...)
# 47| -1: [ExtensionReceiverAccess] this
# 47| 0: [SubExpr] ... - ...
# 47| 0: [MethodAccess] length(...)

View File

@@ -0,0 +1,5 @@
public class Test {
public char f(String s) { return s.charAt(0); }
}

View File

@@ -0,0 +1,2 @@
| Test.java:3:36:3:46 | charAt(...) |
| test.kt:2:20:2:23 | charAt(...) |

View File

@@ -0,0 +1,2 @@
fun f(x: String) = x[0]

View File

@@ -0,0 +1,4 @@
import java
from MethodAccess ma
select ma