-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix StringBuilder-based single character issues
- Loading branch information
Showing
7 changed files
with
184 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/build/ | ||
/out/ | ||
/testData/classes/kt/ | ||
/testData/classes/ktold/ | ||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
plugins/kotlin/testData/results/pkg/TestClassicStringInterpolation.dec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
package pkg | ||
|
||
class TestClassicStringInterpolation { | ||
public final val x: Int = 5 | ||
|
||
|
||
public fun stringInterpolation(x: Int, y: String) { | ||
System.out.println("$x $y");// 5 | ||
}// 6 | ||
|
||
public fun testConstant(x: Int) { | ||
System.out.println("$x 5");// 9 | ||
}// 10 | ||
|
||
public fun testExpression(x: Int) { | ||
System.out.println("$x ${x + 1}");// 13 | ||
}// 14 | ||
|
||
public fun testProperty() { | ||
System.out.println("${this.x}!");// 18 | ||
}// 19 | ||
|
||
public fun testLiteralClass() { | ||
System.out.println("${TestClassicStringInterpolation::class.java}!");// 22 | ||
}// 23 | ||
} | ||
|
||
class 'pkg/TestClassicStringInterpolation' { | ||
method 'stringInterpolation (ILjava/lang/String;)V' { | ||
d 7 | ||
16 7 | ||
1a 7 | ||
1b 7 | ||
1c 7 | ||
1d 7 | ||
1e 7 | ||
1f 7 | ||
21 7 | ||
22 7 | ||
23 7 | ||
24 8 | ||
} | ||
|
||
method 'testConstant (I)V' { | ||
7 11 | ||
10 11 | ||
11 11 | ||
12 11 | ||
13 11 | ||
14 11 | ||
15 11 | ||
17 11 | ||
18 11 | ||
19 11 | ||
1a 12 | ||
} | ||
|
||
method 'testExpression (I)V' { | ||
7 15 | ||
10 15 | ||
11 15 | ||
12 15 | ||
16 15 | ||
17 15 | ||
18 15 | ||
19 15 | ||
1a 15 | ||
1b 15 | ||
1d 15 | ||
1e 15 | ||
1f 15 | ||
20 16 | ||
} | ||
|
||
method 'testProperty ()V' { | ||
7 19 | ||
8 19 | ||
9 19 | ||
a 19 | ||
13 19 | ||
14 19 | ||
15 19 | ||
16 19 | ||
17 19 | ||
18 19 | ||
1a 19 | ||
1b 19 | ||
1c 19 | ||
1d 20 | ||
} | ||
|
||
method 'testLiteralClass ()V' { | ||
7 23 | ||
8 23 | ||
11 23 | ||
12 23 | ||
13 23 | ||
14 23 | ||
15 23 | ||
16 23 | ||
18 23 | ||
19 23 | ||
1a 23 | ||
1b 24 | ||
} | ||
} | ||
|
||
Lines mapping: | ||
5 <-> 8 | ||
6 <-> 9 | ||
9 <-> 12 | ||
10 <-> 13 | ||
13 <-> 16 | ||
14 <-> 17 | ||
18 <-> 20 | ||
19 <-> 21 | ||
22 <-> 24 | ||
23 <-> 25 |
24 changes: 24 additions & 0 deletions
24
plugins/kotlin/testData/src/ktold/pkg/TestClassicStringInterpolation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package pkg | ||
|
||
class TestClassicStringInterpolation { | ||
fun stringInterpolation(x: Int, y: String) { | ||
println("$x $y") | ||
} | ||
|
||
fun testConstant(x: Int) { | ||
println("$x ${5}") | ||
} | ||
|
||
fun testExpression(x: Int) { | ||
println("$x ${x + 1}") | ||
} | ||
|
||
val x = 5 | ||
fun testProperty() { | ||
println("$x!") | ||
} | ||
|
||
fun testLiteralClass() { | ||
println("${TestClassicStringInterpolation::class.java}!") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters