[CHERRY PICKED FROM IJ] Simplify API for InlineConstTracker and add testdata
GitOrigin-RevId: b2bcde9e3102d575ca459f475c00022515b6ccba Original commit: https://github.com/JetBrains/intellij-community/commit/f78e98d1ba5b6c142076b67f88c54282c3964c7f
This commit is contained in:
committed by
Nikita Bobko
parent
40dc548fec
commit
6c7a6bf3b1
@@ -367,7 +367,7 @@ class KotlinJvmModuleBuildTarget(kotlinContext: KotlinCompileContext, jpsModuleB
|
|||||||
|
|
||||||
// process inlineConstTracker
|
// process inlineConstTracker
|
||||||
for (sourceFile: File in sourceFiles) {
|
for (sourceFile: File in sourceFiles) {
|
||||||
val cRefs = inlineConstTracker.inlineConstMap[sourceFile.path]?.map { cRef ->
|
val cRefs = inlineConstTracker.inlineConstMap[sourceFile.path]?.map { cRef: ConstantRef ->
|
||||||
val descriptor = when (cRef.constType) {
|
val descriptor = when (cRef.constType) {
|
||||||
"Byte" -> "B"
|
"Byte" -> "B"
|
||||||
"Short" -> "S"
|
"Short" -> "S"
|
||||||
|
|||||||
Vendored
-7
@@ -1,7 +0,0 @@
|
|||||||
public class JavaClass {
|
|
||||||
public class Inner {
|
|
||||||
public class InnerInner {
|
|
||||||
public static final String CONST = "A";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vendored
-7
@@ -1,7 +0,0 @@
|
|||||||
public class JavaClass {
|
|
||||||
public class Inner {
|
|
||||||
public class InnerInner {
|
|
||||||
public static final String CONST = "B";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-1
@@ -8,7 +8,7 @@ End of files
|
|||||||
Exit code: NOTHING_DONE
|
Exit code: NOTHING_DONE
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
Compiling files:
|
Compiling files:
|
||||||
src/JavaClass.java
|
src/org/jetbrains/JavaClass.java
|
||||||
End of files
|
End of files
|
||||||
Cleaning output files:
|
Cleaning output files:
|
||||||
out/production/module/META-INF/module.kotlin_module
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
|||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package org.jetbrains;
|
||||||
|
|
||||||
|
public class JavaClass {
|
||||||
|
public class Inner {
|
||||||
|
public static final String CONST = "A";
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package org.jetbrains;
|
||||||
|
|
||||||
|
public class JavaClass {
|
||||||
|
public class Inner {
|
||||||
|
public static final String CONST = "B";
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import JavaClass.Inner.InnerInner.CONST
|
import org.jetbrains.JavaClass.Inner.CONST
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
val myKotlinConst = CONST
|
val myKotlinConst = CONST
|
||||||
|
|||||||
Reference in New Issue
Block a user