Merge Kotlin build-1.5.0-dev-1282 with K/N (6b8547b8f93adb)
Straighten Char-to-code and Char-to-digit conversions out #KT-23451 Kotlin/Native base commit: 6b8547b8f93adb49447d6583d3d9934acd1b0922
This commit is contained in:
+4
-4
@@ -2387,7 +2387,7 @@
|
||||
|
||||
|
||||
## Recent ChangeLogs:
|
||||
### [ChangeLog-1.3.X](ChangeLog-1.3.X.md)
|
||||
### [ChangeLog-1.2.X](ChangeLog-1.2.X.md)
|
||||
### [ChangeLog-1.1.X](ChangeLog-1.1.X.md)
|
||||
### [ChangeLog-1.0.X](ChangeLog-1.0.X.md)
|
||||
### [ChangeLog-1.3.X](docs/changelogs/ChangeLog-1.3.X.md)
|
||||
### [ChangeLog-1.2.X](docs/changelogs/ChangeLog-1.2.X.md)
|
||||
### [ChangeLog-1.1.X](docs/changelogs/ChangeLog-1.1.X.md)
|
||||
### [ChangeLog-1.0.X](docs/changelogs/ChangeLog-1.0.X.md)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
[](https://teamcity.jetbrains.com/buildConfiguration/Kotlin_KotlinPublic_Compiler?branch=%3Cdefault%3E&buildTypeTab=overview&mode=builds)
|
||||
[](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.jetbrains.kotlin%22)
|
||||
[](https://www.apache.org/licenses/LICENSE-2.0)
|
||||
[](https://ge.jetbrains.com/scans?search.rootProjectNames=Kotlin)
|
||||
|
||||
# Kotlin Programming Language
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.jetbrains.kotlin.name.parentOrNull
|
||||
import org.jetbrains.kotlin.serialization.SerializerExtensionProtocol
|
||||
import org.jetbrains.kotlin.serialization.deserialization.getClassId
|
||||
import org.jetbrains.kotlin.serialization.js.JsSerializerProtocol
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.capitalizeAsciiOnly
|
||||
import java.io.DataInput
|
||||
import java.io.DataOutput
|
||||
import java.io.File
|
||||
@@ -326,7 +327,7 @@ private class ProtoDataProvider(private val serializerProtocol: SerializerExtens
|
||||
proto.`package`.apply {
|
||||
val packageNameId = getExtensionOrNull(serializerProtocol.packageFqName)
|
||||
val packageFqName = packageNameId?.let { FqName(nameResolver.getPackageFqName(it)) } ?: FqName.ROOT
|
||||
val packagePartClassId = ClassId(packageFqName, Name.identifier(sourceFile.nameWithoutExtension.capitalize() + "Kt"))
|
||||
val packagePartClassId = ClassId(packageFqName, Name.identifier(sourceFile.nameWithoutExtension.capitalizeAsciiOnly() + "Kt"))
|
||||
classes[packagePartClassId] = PackagePartProtoData(this, nameResolver, packageFqName)
|
||||
}
|
||||
|
||||
@@ -347,7 +348,7 @@ fun getProtoData(sourceFile: File, metadata: ByteArray): Map<ClassId, ProtoData>
|
||||
|
||||
proto.`package`.apply {
|
||||
val packageFqName = getExtensionOrNull(JsProtoBuf.packageFqName)?.let(nameResolver::getPackageFqName)?.let(::FqName) ?: FqName.ROOT
|
||||
val packagePartClassId = ClassId(packageFqName, Name.identifier(sourceFile.nameWithoutExtension.capitalize() + "Kt"))
|
||||
val packagePartClassId = ClassId(packageFqName, Name.identifier(sourceFile.nameWithoutExtension.capitalizeAsciiOnly() + "Kt"))
|
||||
classes[packagePartClassId] = PackagePartProtoData(this, nameResolver, packageFqName)
|
||||
}
|
||||
|
||||
@@ -412,4 +413,4 @@ private class PackageMetadataMap(storageFile: File) : BasicStringMap<ByteArray>(
|
||||
operator fun get(packageName: String) = storage[packageName]
|
||||
|
||||
override fun dumpValue(value: ByteArray): String = "Package metadata: ${value.md5()}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,7 +445,6 @@ allprojects {
|
||||
|
||||
if (useJvmIrBackend) {
|
||||
useIR = true
|
||||
freeCompilerArgs += "-Xir-binary-with-stable-abi"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,8 +101,12 @@ fun MutableCollection<JdkId>.discoverJdks(project: Project) {
|
||||
}
|
||||
}
|
||||
|
||||
private val macOsJavaHomeOutRegexes = listOf(Regex("""\s+(\S+),\s+(\S+):\s+".*?"\s+(.+)"""),
|
||||
Regex("""\s+(\S+)\s+\((.*?)\):\s+(.+)"""))
|
||||
private val macOsJavaHomeOutRegexes =
|
||||
listOf(
|
||||
Regex("""\s+(\S+),\s+(\S+):\s+".*?"\s+(.+)"""),
|
||||
Regex("""\s+(\S+)\s+\((.*?)\):\s+(.+)"""),
|
||||
Regex("""\s+(\S+)\s+\((.*?)\)\s+"[^"]*"\s+-\s+"[^"]*"\s(.+)""")
|
||||
)
|
||||
|
||||
fun MutableCollection<JdkId>.discoverJdksOnMacOS(project: Project) {
|
||||
val procBuilder = ProcessBuilder("/usr/libexec/java_home", "-V").redirectErrorStream(true)
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.jetbrains.kotlin.name.FqName;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
import org.jetbrains.kotlin.resolve.AnnotationChecker;
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils;
|
||||
import org.jetbrains.kotlin.resolve.InlineClassesUtilsKt;
|
||||
import org.jetbrains.kotlin.resolve.checkers.ExpectedActualDeclarationChecker;
|
||||
import org.jetbrains.kotlin.resolve.constants.*;
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
@@ -497,6 +498,9 @@ public abstract class AnnotationCodegen {
|
||||
public Void visitKClassValue(KClassValue value, Void data) {
|
||||
KotlinType classType = value.getArgumentType(module);
|
||||
innerClassConsumer.addInnerClassInfoFromAnnotation(DescriptorUtils.getClassDescriptorForType(classType));
|
||||
if (InlineClassesUtilsKt.isInlineClassType(classType)) {
|
||||
classType = TypeUtils.makeNullable(classType);
|
||||
}
|
||||
annotationVisitor.visit(name, typeMapper.mapType(classType));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -17,11 +17,10 @@
|
||||
package org.jetbrains.kotlin.codegen.intrinsics;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import kotlin.text.StringsKt;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.builtins.StandardNames;
|
||||
import org.jetbrains.kotlin.builtins.PrimitiveType;
|
||||
import org.jetbrains.kotlin.builtins.StandardNames;
|
||||
import org.jetbrains.kotlin.codegen.AsmUtil;
|
||||
import org.jetbrains.kotlin.config.JvmTarget;
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor;
|
||||
@@ -30,6 +29,7 @@ import org.jetbrains.kotlin.name.FqNameUnsafe;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmPrimitiveType;
|
||||
import org.jetbrains.kotlin.types.expressions.OperatorConventions;
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.CapitalizeDecapitalizeKt;
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
|
||||
import static org.jetbrains.kotlin.builtins.StandardNames.*;
|
||||
@@ -122,7 +122,9 @@ public class IntrinsicMethods {
|
||||
declareIntrinsicFunction(typeFqName, "toString", 0, TO_STRING);
|
||||
|
||||
intrinsicsMap.registerIntrinsic(
|
||||
BUILT_INS_PACKAGE_FQ_NAME, null, StringsKt.decapitalize(type.getArrayTypeName().asString()) + "Of", 1, new ArrayOf()
|
||||
BUILT_INS_PACKAGE_FQ_NAME, null,
|
||||
CapitalizeDecapitalizeKt.decapitalizeAsciiOnly(type.getArrayTypeName().asString()) + "Of",
|
||||
1, new ArrayOf()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class GenerationState private constructor(
|
||||
fun wantsDiagnostics(v: Boolean) =
|
||||
apply { wantsDiagnostics = v }
|
||||
|
||||
var jvmBackendClassResolver: JvmBackendClassResolver = JvmBackendClassResolverForModuleWithDependencies(module); private set
|
||||
private var jvmBackendClassResolver: JvmBackendClassResolver = JvmBackendClassResolverForModuleWithDependencies(module)
|
||||
fun jvmBackendClassResolver(v: JvmBackendClassResolver) =
|
||||
apply { jvmBackendClassResolver = v }
|
||||
|
||||
@@ -153,8 +153,10 @@ class GenerationState private constructor(
|
||||
val deserializationConfiguration: DeserializationConfiguration =
|
||||
CompilerDeserializationConfiguration(configuration.languageVersionSettings)
|
||||
|
||||
val deprecationProvider =
|
||||
DeprecationResolver(LockBasedStorageManager.NO_LOCKS, configuration.languageVersionSettings, CoroutineCompatibilitySupport.ENABLED, JavaDeprecationSettings)
|
||||
val deprecationProvider = DeprecationResolver(
|
||||
LockBasedStorageManager.NO_LOCKS, configuration.languageVersionSettings, CoroutineCompatibilitySupport.ENABLED,
|
||||
JavaDeprecationSettings
|
||||
)
|
||||
|
||||
init {
|
||||
val icComponents = configuration.get(JVMConfigurationKeys.INCREMENTAL_COMPILATION_COMPONENTS)
|
||||
@@ -250,6 +252,7 @@ class GenerationState private constructor(
|
||||
class ForScript {
|
||||
// quite a mess, this one is an input from repl interpreter
|
||||
var earlierScriptsForReplInterpreter: List<ScriptDescriptor>? = null
|
||||
|
||||
// and the rest is an output from the codegen
|
||||
var resultFieldName: String? = null
|
||||
var resultTypeString: String? = null
|
||||
@@ -346,7 +349,7 @@ class GenerationState private constructor(
|
||||
fun beforeCompile() {
|
||||
markUsed()
|
||||
|
||||
if (!isIrBackend || languageVersionSettings.getFlag(JvmAnalysisFlags.irCheckLocalNames)) {
|
||||
if (!isIrBackend) {
|
||||
CodegenBinding.initTrace(this)
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -88,12 +88,6 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
@Argument(value = "-Xno-use-ir", description = "Do not use the IR backend. Useful for a custom-built compiler where IR backend is enabled by default")
|
||||
var noUseIR: Boolean by FreezableVar(false)
|
||||
|
||||
@Argument(
|
||||
value = "-Xir-check-local-names",
|
||||
description = "Check that names of local classes and anonymous objects are the same in the IR backend as in the old backend"
|
||||
)
|
||||
var irCheckLocalNames: Boolean by FreezableVar(false)
|
||||
|
||||
@Argument(
|
||||
value = "-Xallow-unstable-dependencies",
|
||||
description = "Do not report errors on classes in dependencies, which were compiled by an unstable version of the Kotlin compiler"
|
||||
@@ -314,6 +308,13 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
)
|
||||
var jvmDefault: String by FreezableVar(JvmDefaultMode.DEFAULT.description)
|
||||
|
||||
@Argument(
|
||||
value = "-Xdefault-script-extension",
|
||||
valueDescription = "<script filename extension>",
|
||||
description = "Compile expressions and unrecognized scripts passed with the -script argument as scripts with given filename extension"
|
||||
)
|
||||
var defaultScriptExtension: String? by FreezableVar(null)
|
||||
|
||||
@Argument(value = "-Xdisable-standard-script", description = "Disable standard kotlin script support")
|
||||
var disableStandardScript: Boolean by FreezableVar(false)
|
||||
|
||||
@@ -446,7 +447,6 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
result[JvmAnalysisFlags.inheritMultifileParts] = inheritMultifileParts
|
||||
result[JvmAnalysisFlags.sanitizeParentheses] = sanitizeParentheses
|
||||
result[JvmAnalysisFlags.suppressMissingBuiltinsError] = suppressMissingBuiltinsError
|
||||
result[JvmAnalysisFlags.irCheckLocalNames] = irCheckLocalNames
|
||||
result[JvmAnalysisFlags.enableJvmPreview] = enableJvmPreview
|
||||
result[AnalysisFlags.allowUnstableDependencies] = allowUnstableDependencies || useFir
|
||||
result[JvmAnalysisFlags.disableUltraLightClasses] = disableUltraLightClasses
|
||||
|
||||
@@ -34,22 +34,36 @@ object Main {
|
||||
KOTLIN_HOME = File(home)
|
||||
}
|
||||
|
||||
enum class HowToRun(val argName: String) {
|
||||
GUESS("guess"),
|
||||
CLASSFILE("classfile"),
|
||||
JAR("jar"),
|
||||
SCRIPT("script");
|
||||
// TODO: consider implementing REPL as well
|
||||
|
||||
companion object {
|
||||
val validValues = "${GUESS.argName} (default), ${CLASSFILE.argName}, ${JAR.argName}, ${SCRIPT.argName} (or .<script filename extension>)"
|
||||
|
||||
fun fromArg(name: String): HowToRun? =
|
||||
HowToRun.values().find { it.argName == name }
|
||||
}
|
||||
}
|
||||
|
||||
private fun run(args: Array<String>) {
|
||||
val classpath = arrayListOf<URL>()
|
||||
val compilerClasspath = arrayListOf<URL>()
|
||||
var runner: Runner? = null
|
||||
var collectingArguments = false
|
||||
var collectingExpressions = false
|
||||
var needsCompiler = false
|
||||
val arguments = arrayListOf<String>()
|
||||
var expression: String? = null
|
||||
val compilerArguments = arrayListOf<String>()
|
||||
var noStdLib = false
|
||||
var noReflect = false
|
||||
var howtorun = HowToRun.GUESS
|
||||
|
||||
fun setExpression(expr: String) {
|
||||
if (expression == null) {
|
||||
expression = expr
|
||||
fun setRunner(newRunner: Runner) {
|
||||
if (runner == null) {
|
||||
runner = newRunner
|
||||
} else {
|
||||
throw RunnerException("Only single -e/-expression argument supported")
|
||||
throw AssertionError("conflicting runner settings")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,20 +78,8 @@ object Main {
|
||||
return args[i]
|
||||
}
|
||||
|
||||
if (collectingExpressions) {
|
||||
if ("-expression" == arg || "-e" == arg) {
|
||||
setExpression(next())
|
||||
i++
|
||||
continue
|
||||
} else {
|
||||
collectingArguments = true
|
||||
}
|
||||
}
|
||||
|
||||
if (collectingArguments) {
|
||||
arguments.add(arg)
|
||||
i++
|
||||
continue
|
||||
fun restAsArguments() {
|
||||
arguments.addAll(args.copyOfRange(i+1, args.size))
|
||||
}
|
||||
|
||||
if ("-help" == arg || "-h" == arg) {
|
||||
@@ -96,29 +98,55 @@ object Main {
|
||||
compilerClasspath.addPath(path)
|
||||
}
|
||||
}
|
||||
else if ("-howtorun" == arg) {
|
||||
if (howtorun != HowToRun.GUESS) {
|
||||
throw RunnerException("-howtorun is already set to ${howtorun.argName}")
|
||||
}
|
||||
val howToRunArg = next()
|
||||
if (howToRunArg.startsWith(".")) {
|
||||
howtorun = HowToRun.SCRIPT
|
||||
compilerArguments.add("-Xdefault-script-extension=$howToRunArg")
|
||||
} else {
|
||||
howtorun = HowToRun.fromArg(howToRunArg)
|
||||
?: throw RunnerException("invalid argument to the option -howtorun $howToRunArg, valid arguments are: ${HowToRun.validValues}")
|
||||
}
|
||||
}
|
||||
else if ("-expression" == arg || "-e" == arg) {
|
||||
setExpression(next())
|
||||
collectingExpressions = true
|
||||
needsCompiler = true
|
||||
if (howtorun != HowToRun.GUESS && howtorun != HowToRun.SCRIPT) {
|
||||
throw RunnerException("expression evaluation is not compatible with -howtorun argument ${howtorun.argName}")
|
||||
}
|
||||
setRunner(ExpressionRunner(next()))
|
||||
restAsArguments()
|
||||
break
|
||||
}
|
||||
else if ("-no-stdlib" == arg) {
|
||||
noStdLib = true
|
||||
compilerArguments.add(arg)
|
||||
}
|
||||
else if ("-no-reflect" == arg) {
|
||||
noReflect = true
|
||||
compilerArguments.add(arg)
|
||||
}
|
||||
else if (arg.startsWith("-X")) {
|
||||
compilerArguments.add(arg)
|
||||
}
|
||||
else if (arg.startsWith("-")) {
|
||||
throw RunnerException("unsupported argument: $arg")
|
||||
throw RunnerException("unknown option: $arg")
|
||||
}
|
||||
else if (arg.endsWith(".jar")) {
|
||||
runner = JarRunner(arg)
|
||||
collectingArguments = true
|
||||
else if (howtorun == HowToRun.JAR || (howtorun == HowToRun.GUESS && arg.endsWith(".jar"))) {
|
||||
setRunner(JarRunner(arg))
|
||||
restAsArguments()
|
||||
break
|
||||
}
|
||||
else if (arg.endsWith(".kts")) {
|
||||
runner = ScriptRunner(arg)
|
||||
collectingArguments = true
|
||||
needsCompiler = true
|
||||
else if (howtorun == HowToRun.SCRIPT || (howtorun == HowToRun.GUESS && arg.endsWith(".kts"))) {
|
||||
setRunner(ScriptRunner(arg))
|
||||
restAsArguments()
|
||||
break
|
||||
}
|
||||
else {
|
||||
runner = MainClassRunner(arg)
|
||||
collectingArguments = true
|
||||
setRunner(MainClassRunner(arg))
|
||||
restAsArguments()
|
||||
break
|
||||
}
|
||||
i++
|
||||
}
|
||||
@@ -127,26 +155,25 @@ object Main {
|
||||
classpath.addPath(".")
|
||||
}
|
||||
|
||||
classpath.addPath("$KOTLIN_HOME/lib/kotlin-stdlib.jar")
|
||||
if (!noStdLib) {
|
||||
classpath.addPath("$KOTLIN_HOME/lib/kotlin-stdlib.jar")
|
||||
}
|
||||
|
||||
if (!noReflect) {
|
||||
classpath.addPath("$KOTLIN_HOME/lib/kotlin-reflect.jar")
|
||||
}
|
||||
|
||||
if (expression != null) {
|
||||
runner = ExpressionRunner(expression!!)
|
||||
} else if (runner == null) {
|
||||
runner = ReplRunner()
|
||||
needsCompiler = true
|
||||
if (runner == null) {
|
||||
setRunner(ReplRunner())
|
||||
}
|
||||
|
||||
if (needsCompiler && compilerClasspath.isEmpty()) {
|
||||
if (runner is RunnerWithCompiler && compilerClasspath.isEmpty()) {
|
||||
findCompilerJar(this::class.java, KOTLIN_HOME.resolve("lib")).forEach {
|
||||
compilerClasspath.add(it.absoluteFile.toURI().toURL())
|
||||
}
|
||||
}
|
||||
|
||||
runner.run(classpath, arguments, compilerClasspath)
|
||||
runner!!.run(classpath, compilerArguments, arguments, compilerClasspath)
|
||||
}
|
||||
|
||||
private fun MutableList<URL>.addPath(path: String) {
|
||||
@@ -167,21 +194,31 @@ object Main {
|
||||
private fun printUsageAndExit() {
|
||||
println("""kotlin: run Kotlin programs, scripts or REPL.
|
||||
|
||||
Usage: kotlin <options> <command> <arguments>
|
||||
where command may be one of:
|
||||
foo.Bar Runs the 'main' function from the class with the given qualified name
|
||||
app.jar Runs the given JAR file as 'java -jar' would do
|
||||
(-classpath argument is ignored and no Kotlin runtime is added to the classpath)
|
||||
""" +
|
||||
// script.kts Compiles and runs the given script
|
||||
// -expression (-e) '2+2' Evaluates the expression and prints the result
|
||||
"""and possible options include:
|
||||
Usage: kotlin <options> <command> [<arguments>]
|
||||
where possible options include:
|
||||
-howtorun <value> How to run the supplied command with arguments,
|
||||
valid values: ${HowToRun.validValues}
|
||||
-classpath (-cp) <path> Paths where to find user class files
|
||||
-Dname=value Set a system JVM property
|
||||
-J<option> Pass an option directly to JVM
|
||||
-no-stdlib Don't include Kotlin standard library into classpath
|
||||
-no-reflect Don't include Kotlin reflection implementation into classpath
|
||||
-compiler-path Kotlin compiler classpath for compiling script or expression or running REPL
|
||||
If not specified, try to find the compiler in the environment
|
||||
-X<flag>[=value] Pass -X argument to the compiler
|
||||
-version Display Kotlin version
|
||||
-help (-h) Print a synopsis of options
|
||||
and command is interpreted according to the -howtorun option argument
|
||||
or, in case of guess, according to the following rules:
|
||||
foo.Bar Runs the 'main' function from the class with the given qualified name
|
||||
(compiler arguments are ignored)
|
||||
app.jar Runs the given JAR file as 'java -jar' would do
|
||||
(compiler arguments are ignored and no Kotlin stdlib is added to the classpath)
|
||||
script.kts Compiles and runs the given script, passing <arguments> to it
|
||||
-expression (-e) '2+2' Evaluates the expression and prints the result, passing <arguments> to it
|
||||
<no command> Runs Kotlin REPL
|
||||
arguments are passed to the main function when running class or jar file, and for standard script definitions
|
||||
as the 'args' parameter when running script or expression
|
||||
""")
|
||||
exitProcess(0)
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.net.URL
|
||||
interface Runner {
|
||||
fun run(
|
||||
classpath: List<URL>,
|
||||
compilerArguments: List<String>,
|
||||
arguments: List<String>,
|
||||
compilerClasspath: List<URL>
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ abstract class AbstractRunner : Runner {
|
||||
|
||||
protected abstract fun createClassLoader(classpath: List<URL>): ClassLoader
|
||||
|
||||
override fun run(classpath: List<URL>, arguments: List<String>, compilerClasspath: List<URL>) {
|
||||
override fun run(classpath: List<URL>, compilerArguments: List<String>, arguments: List<String>, compilerClasspath: List<URL>) {
|
||||
val classLoader = createClassLoader(classpath)
|
||||
|
||||
val mainClass = try {
|
||||
@@ -127,39 +127,45 @@ private fun MutableList<String>.addClasspathArgIfNeeded(classpath: List<URL>) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun ArrayList<String>.addScriptArguments(arguments: List<String>) {
|
||||
if (arguments.isNotEmpty() && arguments.first() != "--") {
|
||||
add("--")
|
||||
}
|
||||
addAll(arguments)
|
||||
}
|
||||
|
||||
class ReplRunner : RunnerWithCompiler() {
|
||||
override fun run(classpath: List<URL>, arguments: List<String>, compilerClasspath: List<URL>) {
|
||||
val compilerArgs = ArrayList<String>()
|
||||
compilerArgs.addClasspathArgIfNeeded(classpath)
|
||||
override fun run(classpath: List<URL>, compilerArguments: List<String>, arguments: List<String>, compilerClasspath: List<URL>) {
|
||||
val compilerArgs = ArrayList<String>().apply {
|
||||
addClasspathArgIfNeeded(classpath)
|
||||
addAll(compilerArguments)
|
||||
addScriptArguments(arguments)
|
||||
}
|
||||
runCompiler(compilerClasspath, compilerArgs)
|
||||
}
|
||||
}
|
||||
|
||||
class ScriptRunner(private val path: String) : RunnerWithCompiler() {
|
||||
override fun run(classpath: List<URL>, arguments: List<String>, compilerClasspath: List<URL>) {
|
||||
override fun run(classpath: List<URL>, compilerArguments: List<String>, arguments: List<String>, compilerClasspath: List<URL>) {
|
||||
val compilerArgs = ArrayList<String>().apply {
|
||||
addClasspathArgIfNeeded(classpath)
|
||||
addAll(compilerArguments)
|
||||
add("-script")
|
||||
add(path)
|
||||
if (arguments.isNotEmpty() && arguments.first() != "--") {
|
||||
add("--")
|
||||
}
|
||||
addAll(arguments)
|
||||
addScriptArguments(arguments)
|
||||
}
|
||||
runCompiler(compilerClasspath, compilerArgs)
|
||||
}
|
||||
}
|
||||
|
||||
class ExpressionRunner(private val code: String) : RunnerWithCompiler() {
|
||||
override fun run(classpath: List<URL>, arguments: List<String>, compilerClasspath: List<URL>) {
|
||||
override fun run(classpath: List<URL>, compilerArguments: List<String>, arguments: List<String>, compilerClasspath: List<URL>) {
|
||||
val compilerArgs = ArrayList<String>().apply {
|
||||
addClasspathArgIfNeeded(classpath)
|
||||
addAll(compilerArguments)
|
||||
add("-expression")
|
||||
add(code)
|
||||
if (arguments.isNotEmpty() && arguments.first() != "--") {
|
||||
add("--")
|
||||
}
|
||||
addAll(arguments)
|
||||
addScriptArguments(arguments)
|
||||
}
|
||||
runCompiler(compilerClasspath, compilerArgs)
|
||||
}
|
||||
|
||||
+2
-1
@@ -23,6 +23,7 @@ import org.fusesource.jansi.Ansi;
|
||||
import org.fusesource.jansi.internal.CLibrary;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.CapitalizeDecapitalizeKt;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
@@ -130,7 +131,7 @@ public abstract class PlainTextMessageRenderer implements MessageRenderer {
|
||||
return message;
|
||||
}
|
||||
|
||||
return StringsKt.decapitalize(message);
|
||||
return CapitalizeDecapitalizeKt.decapitalizeAsciiOnly(message);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+2
-1
@@ -30,6 +30,7 @@ import org.xml.sax.SAXException
|
||||
import org.xml.sax.helpers.DefaultHandler
|
||||
import java.io.IOException
|
||||
import java.io.Reader
|
||||
import java.util.*
|
||||
import javax.xml.parsers.SAXParserFactory
|
||||
|
||||
object CompilerOutputParser {
|
||||
@@ -124,7 +125,7 @@ object CompilerOutputParser {
|
||||
// We're directly inside the root tag: <MESSAGES>
|
||||
return
|
||||
}
|
||||
val qNameLowerCase = qName.toLowerCase()
|
||||
val qNameLowerCase = qName.toLowerCase(Locale.US)
|
||||
var category: CompilerMessageSeverity? = CATEGORIES[qNameLowerCase]
|
||||
if (category == null) {
|
||||
messageCollector.report(ERROR, "Unknown compiler message tag: $qName")
|
||||
|
||||
@@ -27,9 +27,6 @@ object JvmAnalysisFlags {
|
||||
@JvmStatic
|
||||
val suppressMissingBuiltinsError by AnalysisFlag.Delegates.Boolean
|
||||
|
||||
@JvmStatic
|
||||
val irCheckLocalNames by AnalysisFlag.Delegates.Boolean
|
||||
|
||||
@JvmStatic
|
||||
val disableUltraLightClasses by AnalysisFlag.Delegates.Boolean
|
||||
|
||||
|
||||
+2
-1
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.daemon.common
|
||||
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.toLowerCaseAsciiOnly
|
||||
import java.io.File
|
||||
|
||||
enum class OSKind {
|
||||
@@ -25,7 +26,7 @@ enum class OSKind {
|
||||
Unknown;
|
||||
|
||||
companion object {
|
||||
val current: OSKind = System.getProperty("os.name").toLowerCase().let {
|
||||
val current: OSKind = System.getProperty("os.name").toLowerCaseAsciiOnly().let {
|
||||
when {
|
||||
// partly taken from http://www.code4copy.com/java/post/detecting-os-type-in-java
|
||||
it.startsWith("windows") -> Windows
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -75,7 +75,7 @@ FILE: RedundantExplicitTypeChecker.kt
|
||||
public final fun test(boolean: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
lval expectedLong: R|kotlin/Long| = when () {
|
||||
R|<local>/boolean| -> {
|
||||
Int(42)
|
||||
Long(42)
|
||||
}
|
||||
else -> {
|
||||
^test Unit
|
||||
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
FILE: SpecialCallsWithLambdas.kt
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval inv: R|() -> kotlin/Function0<kotlin/Unit>| = fun <anonymous>(): R|() -> kotlin/Unit| {
|
||||
^ fun <anonymous>(): R|kotlin/Unit| {
|
||||
^ Unit
|
||||
}
|
||||
|
||||
}
|
||||
!!
|
||||
lval bar: R|() -> kotlin/Function0<kotlin/Unit>| = fun <anonymous>(): R|() -> kotlin/Unit| {
|
||||
^ fun <anonymous>(): R|kotlin/Unit| {
|
||||
^ Unit
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo() {
|
||||
val inv = {{}}!!
|
||||
val bar = {{}}
|
||||
}
|
||||
+7
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -4889,6 +4889,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/receiverResolutionInLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("SpecialCallsWithLambdas.kt")
|
||||
public void testSpecialCallsWithLambdas() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/SpecialCallsWithLambdas.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("TypesEligibleForSimpleVisit.kt")
|
||||
public void testTypesEligibleForSimpleVisit() throws Exception {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -6957,12 +6957,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/delegatedProperty/incompleteTypeInference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt37796.kt")
|
||||
public void testKt37796() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/delegatedProperty/kt37796.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt4640.kt")
|
||||
public void testKt4640() throws Exception {
|
||||
@@ -12426,6 +12420,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeWithTypeVariableSubtyping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("capturedTypesSubstitutionIntoAbbreviation.kt")
|
||||
public void testCapturedTypesSubstitutionIntoAbbreviation() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
||||
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.toLowerCaseAsciiOnly
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.ifNotEmpty
|
||||
|
||||
open class FirJvmMangleComputer(
|
||||
@@ -210,7 +211,7 @@ open class FirJvmMangleComputer(
|
||||
is ConeStarProjection -> appendSignature(MangleConstant.STAR_MARK)
|
||||
is ConeKotlinTypeProjection -> {
|
||||
if (arg.kind != ProjectionKind.INVARIANT) {
|
||||
appendSignature(arg.kind.name.toLowerCase())
|
||||
appendSignature(arg.kind.name.toLowerCaseAsciiOnly())
|
||||
appendSignature(MangleConstant.VARIANCE_SEPARATOR)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
Generated
+56
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -10030,6 +10030,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedPropertyInEnum.kt")
|
||||
public void testDelegatedPropertyInEnum() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt");
|
||||
@@ -11072,6 +11077,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/enum/asReturnExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("bigEnum.kt")
|
||||
public void testBigEnum() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/enum/bigEnum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classForEnumEntry.kt")
|
||||
public void testClassForEnumEntry() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/enum/classForEnumEntry.kt");
|
||||
@@ -11177,6 +11187,21 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/enum/inclassobj.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initEntriesInCompanionObject.kt")
|
||||
public void testInitEntriesInCompanionObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/enum/initEntriesInCompanionObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initEntriesInValueOf.kt")
|
||||
public void testInitEntriesInValueOf() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/enum/initEntriesInValueOf.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initEnumAfterObjectAccess.kt")
|
||||
public void testInitEnumAfterObjectAccess() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/enum/initEnumAfterObjectAccess.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inner.kt")
|
||||
public void testInner() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/enum/inner.kt");
|
||||
@@ -13301,6 +13326,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/inference/capturedStarProjection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("capturedTypesSubstitutionIntoAbbreviation.kt")
|
||||
public void testCapturedTypesSubstitutionIntoAbbreviation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/capturedTypesSubstitutionIntoAbbreviation.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("coercionToUnitForLambdaReturnTypeWithFlexibleConstraint.kt")
|
||||
public void testCoercionToUnitForLambdaReturnTypeWithFlexibleConstraint() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/coercionToUnitForLambdaReturnTypeWithFlexibleConstraint.kt");
|
||||
@@ -13982,6 +14012,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvmStaticVarInInlineClassCompanion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kclassInAnnotation.kt")
|
||||
public void testKclassInAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kclassInAnnotation.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt25246.kt")
|
||||
public void testKt25246() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt25246.kt");
|
||||
@@ -16235,6 +16270,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ambiguousJavaVararg.kt")
|
||||
public void testAmbiguousJavaVararg() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/ambiguousJavaVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericSamProjectedOut.kt")
|
||||
public void testGenericSamProjectedOut() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt");
|
||||
@@ -31078,6 +31118,16 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/strings/javaToStringNPE.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt13213.kt")
|
||||
public void testKt13213() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/strings/kt13213.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt13213a.kt")
|
||||
public void testKt13213a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/strings/kt13213a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt2592.kt")
|
||||
public void testKt2592() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/strings/kt2592.kt");
|
||||
@@ -32363,6 +32413,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/kt25784.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt30402.kt")
|
||||
public void testKt30402() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/kt30402.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt43286.kt")
|
||||
public void testKt43286() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/unsignedTypes/kt43286.kt");
|
||||
|
||||
+19
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -2133,6 +2133,24 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/jvmName")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class JvmName extends AbstractFirBlackBoxInlineCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInJvmName() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/jvmName/simple.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/jvmPackageName")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+6
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -1453,6 +1453,11 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/effectivelyInlineOnly.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("internalInlineSuspend.kt")
|
||||
public void testInternalInlineSuspend() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/internalInlineSuspend.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("mergeLvt.kt")
|
||||
public void testMergeLvt() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/mergeLvt.kt");
|
||||
|
||||
+6
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -2246,6 +2246,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
runTest("compiler/testData/ir/irText/types/starProjection_OI.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeAliasWithUnsafeVariance.kt")
|
||||
public void testTypeAliasWithUnsafeVariance() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/ir/irText/types/nullChecks")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -178,7 +178,6 @@ class JavaSymbolProvider(
|
||||
javaTypeParameterStack.addStack(parentStack)
|
||||
}
|
||||
}
|
||||
val methodMap = mutableMapOf<JavaMethod, FirJavaMethod>()
|
||||
val firJavaClass = buildJavaClass {
|
||||
source = (javaClass as? JavaElementImpl<*>)?.psi?.toFirPsiSourceElement()
|
||||
session = this@JavaSymbolProvider.session
|
||||
@@ -201,7 +200,7 @@ class JavaSymbolProvider(
|
||||
}
|
||||
}
|
||||
|
||||
val dispatchReceiver = classId.defaultType(typeParameters.map { it.symbol } )
|
||||
val dispatchReceiver = classId.defaultType(typeParameters.map { it.symbol })
|
||||
|
||||
status = FirResolvedDeclarationStatusImpl(
|
||||
javaClass.visibility,
|
||||
@@ -230,9 +229,7 @@ class JavaSymbolProvider(
|
||||
classIsAnnotation,
|
||||
valueParametersForAnnotationConstructor,
|
||||
dispatchReceiver
|
||||
).apply {
|
||||
methodMap[javaMethod] = this
|
||||
}
|
||||
)
|
||||
}
|
||||
val javaClassDeclaredConstructors = javaClass.constructors
|
||||
val constructorId = CallableId(classId.packageFqName, classId.relativeClassName, classId.shortClassName)
|
||||
@@ -283,10 +280,6 @@ class JavaSymbolProvider(
|
||||
}
|
||||
)
|
||||
firJavaClass.addAnnotationsFrom(this@JavaSymbolProvider.session, javaClass, javaTypeParameterStack)
|
||||
// NB: this is done here to unbind possible annotation cycle
|
||||
for ((javaMethod, firJavaMethod) in methodMap) {
|
||||
firJavaMethod.annotations.addAnnotationsFrom(session, javaMethod, javaTypeParameterStack)
|
||||
}
|
||||
return firJavaClass
|
||||
}
|
||||
|
||||
@@ -340,7 +333,7 @@ class JavaSymbolProvider(
|
||||
returnTypeRef = returnType.toFirJavaTypeRef(this@JavaSymbolProvider.session, javaTypeParameterStack)
|
||||
isVar = !javaField.isFinal
|
||||
isStatic = javaField.isStatic
|
||||
addAnnotationsFrom(this@JavaSymbolProvider.session, javaField, javaTypeParameterStack)
|
||||
annotationBuilder = { javaField.annotations.map { it.toFirAnnotationCall(session, javaTypeParameterStack) } }
|
||||
initializer = convertJavaInitializerToFir(javaField.initializerValue)
|
||||
|
||||
if (!javaField.isStatic) {
|
||||
@@ -386,6 +379,7 @@ class JavaSymbolProvider(
|
||||
this@JavaSymbolProvider.session, index, javaTypeParameterStack,
|
||||
)
|
||||
}
|
||||
annotationBuilder = { javaMethod.annotations.map { it.toFirAnnotationCall(session, javaTypeParameterStack) } }
|
||||
status = FirResolvedDeclarationStatusImpl(
|
||||
javaMethod.visibility,
|
||||
javaMethod.modality
|
||||
@@ -466,12 +460,14 @@ class JavaSymbolProvider(
|
||||
|
||||
if (javaConstructor != null) {
|
||||
this.typeParameters += javaConstructor.typeParameters.convertTypeParameters(javaTypeParameterStack)
|
||||
addAnnotationsFrom(this@JavaSymbolProvider.session, javaConstructor, javaTypeParameterStack)
|
||||
annotationBuilder = { javaConstructor.annotations.map { it.toFirAnnotationCall(session, javaTypeParameterStack) } }
|
||||
for ((index, valueParameter) in javaConstructor.valueParameters.withIndex()) {
|
||||
valueParameters += valueParameter.toFirValueParameter(
|
||||
this@JavaSymbolProvider.session, index, javaTypeParameterStack,
|
||||
)
|
||||
}
|
||||
} else {
|
||||
annotationBuilder = { emptyList() }
|
||||
}
|
||||
}.apply {
|
||||
containingClassAttr = ownerClassBuilder.symbol.toLookupTag()
|
||||
@@ -495,6 +491,7 @@ class JavaSymbolProvider(
|
||||
visibility = Visibilities.Public
|
||||
isInner = false
|
||||
isPrimary = true
|
||||
annotationBuilder = { emptyList() }
|
||||
}.apply {
|
||||
containingClassAttr = ownerClassBuilder.symbol.toLookupTag()
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.types.Variance.*
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.capitalizeAsciiOnly
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.runIf
|
||||
import java.lang.Deprecated
|
||||
import java.lang.annotation.Documented
|
||||
@@ -140,7 +141,7 @@ internal fun JavaType?.toConeKotlinTypeWithoutEnhancement(
|
||||
val primitiveType = type
|
||||
val kotlinPrimitiveName = when (val javaName = primitiveType?.typeName?.asString()) {
|
||||
null -> "Unit"
|
||||
else -> javaName.capitalize()
|
||||
else -> javaName.capitalizeAsciiOnly()
|
||||
}
|
||||
|
||||
val classId = StandardClassIds.byName(kotlinPrimitiveName)
|
||||
@@ -194,7 +195,7 @@ private fun JavaArrayType.toConeKotlinTypeWithoutEnhancement(
|
||||
)
|
||||
}
|
||||
} else {
|
||||
val javaComponentName = componentType.type?.typeName?.asString()?.capitalize() ?: error("Array of voids")
|
||||
val javaComponentName = componentType.type?.typeName?.asString()?.capitalizeAsciiOnly() ?: error("Array of voids")
|
||||
val classId = StandardClassIds.byName(javaComponentName + "Array")
|
||||
|
||||
if (forAnnotationValueParameter) {
|
||||
|
||||
+6
-3
@@ -35,7 +35,7 @@ class FirJavaConstructor @FirImplementationDetail constructor(
|
||||
override var returnTypeRef: FirTypeRef,
|
||||
override val valueParameters: MutableList<FirValueParameter>,
|
||||
override val typeParameters: MutableList<FirTypeParameterRef>,
|
||||
override val annotations: MutableList<FirAnnotationCall>,
|
||||
annotationBuilder: () -> List<FirAnnotationCall>,
|
||||
override var status: FirDeclarationStatus,
|
||||
override var resolvePhase: FirResolvePhase,
|
||||
override val dispatchReceiverType: ConeKotlinType?,
|
||||
@@ -59,6 +59,9 @@ class FirJavaConstructor @FirImplementationDetail constructor(
|
||||
|
||||
override val controlFlowGraphReference: FirControlFlowGraphReference? get() = null
|
||||
|
||||
override val annotations: List<FirAnnotationCall> by lazy { annotationBuilder() }
|
||||
|
||||
|
||||
override fun <D> transformValueParameters(transformer: FirTransformer<D>, data: D): FirJavaConstructor {
|
||||
valueParameters.transformInplace(transformer, data)
|
||||
return this
|
||||
@@ -101,7 +104,6 @@ class FirJavaConstructor @FirImplementationDetail constructor(
|
||||
}
|
||||
|
||||
override fun <D> transformAnnotations(transformer: FirTransformer<D>, data: D): FirJavaConstructor {
|
||||
annotations.transformInplace(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -143,6 +145,7 @@ class FirJavaConstructorBuilder : FirConstructorBuilder() {
|
||||
lateinit var visibility: Visibility
|
||||
var isInner: Boolean by Delegates.notNull()
|
||||
var isPrimary: Boolean by Delegates.notNull()
|
||||
lateinit var annotationBuilder: () -> List<FirAnnotationCall>
|
||||
|
||||
@OptIn(FirImplementationDetail::class)
|
||||
override fun build(): FirJavaConstructor {
|
||||
@@ -154,7 +157,7 @@ class FirJavaConstructorBuilder : FirConstructorBuilder() {
|
||||
returnTypeRef,
|
||||
valueParameters,
|
||||
typeParameters,
|
||||
annotations,
|
||||
annotationBuilder,
|
||||
status,
|
||||
resolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES,
|
||||
dispatchReceiverType
|
||||
|
||||
@@ -40,7 +40,7 @@ class FirJavaField @FirImplementationDetail constructor(
|
||||
override var returnTypeRef: FirTypeRef,
|
||||
override var status: FirDeclarationStatus,
|
||||
override val isVar: Boolean,
|
||||
override val annotations: MutableList<FirAnnotationCall>,
|
||||
annotationBuilder: () -> List<FirAnnotationCall>,
|
||||
override val typeParameters: MutableList<FirTypeParameter>,
|
||||
override var initializer: FirExpression?,
|
||||
override val dispatchReceiverType: ConeKotlinType?,
|
||||
@@ -58,6 +58,9 @@ class FirJavaField @FirImplementationDetail constructor(
|
||||
override val origin: FirDeclarationOrigin
|
||||
get() = FirDeclarationOrigin.Java
|
||||
|
||||
override val annotations: List<FirAnnotationCall> by lazy { annotationBuilder() }
|
||||
|
||||
|
||||
override fun <D> transformReturnTypeRef(transformer: FirTransformer<D>, data: D): FirField {
|
||||
returnTypeRef = returnTypeRef.transformSingle(transformer, data)
|
||||
return this
|
||||
@@ -109,7 +112,6 @@ class FirJavaField @FirImplementationDetail constructor(
|
||||
}
|
||||
|
||||
override fun <D> transformAnnotations(transformer: FirTransformer<D>, data: D): FirJavaField {
|
||||
annotations.transformInplace(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -147,6 +149,7 @@ internal class FirJavaFieldBuilder : FirFieldBuilder() {
|
||||
lateinit var visibility: Visibility
|
||||
var isStatic: Boolean by Delegates.notNull()
|
||||
var initializer: FirExpression? = null
|
||||
lateinit var annotationBuilder: () -> List<FirAnnotationCall>
|
||||
|
||||
override var resolvePhase: FirResolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES
|
||||
|
||||
@@ -161,7 +164,7 @@ internal class FirJavaFieldBuilder : FirFieldBuilder() {
|
||||
returnTypeRef,
|
||||
status,
|
||||
isVar,
|
||||
annotations,
|
||||
annotationBuilder,
|
||||
typeParameters,
|
||||
initializer,
|
||||
dispatchReceiverType,
|
||||
|
||||
+148
-42
@@ -10,17 +10,24 @@ import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirImplementationDetail
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.FirSourceElement
|
||||
import org.jetbrains.kotlin.fir.builder.FirAnnotationContainerBuilder
|
||||
import org.jetbrains.kotlin.fir.builder.FirBuilderDsl
|
||||
import org.jetbrains.kotlin.fir.contracts.FirContractDescription
|
||||
import org.jetbrains.kotlin.fir.contracts.impl.FirEmptyContractDescription
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.FirSimpleFunctionBuilder
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirSimpleFunctionImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.FirFunctionBuilder
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.FirTypeParametersOwnerBuilder
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirBlock
|
||||
import org.jetbrains.kotlin.fir.references.FirControlFlowGraphReference
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.jvm.FirJavaTypeRef
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
import org.jetbrains.kotlin.fir.visitors.transformInplace
|
||||
import org.jetbrains.kotlin.fir.visitors.transformSingle
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions.ASSIGNMENT_OPERATIONS
|
||||
@@ -40,51 +47,153 @@ import kotlin.properties.Delegates
|
||||
|
||||
@OptIn(FirImplementationDetail::class)
|
||||
class FirJavaMethod @FirImplementationDetail constructor(
|
||||
source: FirSourceElement?,
|
||||
session: FirSession,
|
||||
resolvePhase: FirResolvePhase,
|
||||
attributes: FirDeclarationAttributes,
|
||||
returnTypeRef: FirTypeRef,
|
||||
receiverTypeRef: FirTypeRef?,
|
||||
typeParameters: MutableList<FirTypeParameter>,
|
||||
valueParameters: MutableList<FirValueParameter>,
|
||||
body: FirBlock?,
|
||||
name: Name,
|
||||
status: FirDeclarationStatus,
|
||||
containerSource: DeserializedContainerSource?,
|
||||
symbol: FirNamedFunctionSymbol,
|
||||
annotations: MutableList<FirAnnotationCall>,
|
||||
dispatchReceiverType: ConeKotlinType?,
|
||||
) : FirSimpleFunctionImpl(
|
||||
source,
|
||||
session,
|
||||
resolvePhase,
|
||||
FirDeclarationOrigin.Java,
|
||||
attributes,
|
||||
returnTypeRef,
|
||||
receiverTypeRef,
|
||||
valueParameters,
|
||||
body,
|
||||
status,
|
||||
containerSource,
|
||||
dispatchReceiverType = dispatchReceiverType,
|
||||
contractDescription = FirEmptyContractDescription,
|
||||
name,
|
||||
symbol,
|
||||
annotations,
|
||||
typeParameters,
|
||||
)
|
||||
override val source: FirSourceElement?,
|
||||
override val session: FirSession,
|
||||
override var resolvePhase: FirResolvePhase,
|
||||
override val attributes: FirDeclarationAttributes,
|
||||
override var returnTypeRef: FirTypeRef,
|
||||
override val typeParameters: MutableList<FirTypeParameter>,
|
||||
override val valueParameters: MutableList<FirValueParameter>,
|
||||
override val name: Name,
|
||||
override var status: FirDeclarationStatus,
|
||||
override val symbol: FirNamedFunctionSymbol,
|
||||
annotationBuilder: () -> List<FirAnnotationCall>,
|
||||
override val dispatchReceiverType: ConeKotlinType?,
|
||||
) : FirSimpleFunction() {
|
||||
init {
|
||||
symbol.bind(this)
|
||||
}
|
||||
|
||||
override val receiverTypeRef: FirTypeRef?
|
||||
get() = null
|
||||
|
||||
override val body: FirBlock?
|
||||
get() = null
|
||||
|
||||
override val containerSource: DeserializedContainerSource?
|
||||
get() = null
|
||||
|
||||
override val origin: FirDeclarationOrigin
|
||||
get() = FirDeclarationOrigin.Java
|
||||
|
||||
override val contractDescription: FirContractDescription
|
||||
get() = FirEmptyContractDescription
|
||||
|
||||
override var controlFlowGraphReference: FirControlFlowGraphReference? = null
|
||||
|
||||
override val annotations: List<FirAnnotationCall> by lazy { annotationBuilder() }
|
||||
|
||||
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
|
||||
returnTypeRef.accept(visitor, data)
|
||||
receiverTypeRef?.accept(visitor, data)
|
||||
controlFlowGraphReference?.accept(visitor, data)
|
||||
valueParameters.forEach { it.accept(visitor, data) }
|
||||
body?.accept(visitor, data)
|
||||
status.accept(visitor, data)
|
||||
contractDescription.accept(visitor, data)
|
||||
annotations.forEach { it.accept(visitor, data) }
|
||||
typeParameters.forEach { it.accept(visitor, data) }
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirSimpleFunction {
|
||||
transformReturnTypeRef(transformer, data)
|
||||
transformReceiverTypeRef(transformer, data)
|
||||
controlFlowGraphReference = controlFlowGraphReference?.transformSingle(transformer, data)
|
||||
transformValueParameters(transformer, data)
|
||||
transformBody(transformer, data)
|
||||
transformStatus(transformer, data)
|
||||
transformContractDescription(transformer, data)
|
||||
transformAnnotations(transformer, data)
|
||||
transformTypeParameters(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformReturnTypeRef(transformer: FirTransformer<D>, data: D): FirSimpleFunction {
|
||||
returnTypeRef = returnTypeRef.transformSingle(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformReceiverTypeRef(transformer: FirTransformer<D>, data: D): FirSimpleFunction {
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformValueParameters(transformer: FirTransformer<D>, data: D): FirSimpleFunction {
|
||||
valueParameters.transformInplace(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformBody(transformer: FirTransformer<D>, data: D): FirSimpleFunction {
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformStatus(transformer: FirTransformer<D>, data: D): FirSimpleFunction {
|
||||
status = status.transformSingle(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformContractDescription(transformer: FirTransformer<D>, data: D): FirSimpleFunction {
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformAnnotations(transformer: FirTransformer<D>, data: D): FirSimpleFunction {
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformTypeParameters(transformer: FirTransformer<D>, data: D): FirSimpleFunction {
|
||||
typeParameters.transformInplace(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun replaceResolvePhase(newResolvePhase: FirResolvePhase) {
|
||||
resolvePhase = newResolvePhase
|
||||
}
|
||||
|
||||
override fun replaceReturnTypeRef(newReturnTypeRef: FirTypeRef) {
|
||||
returnTypeRef = newReturnTypeRef
|
||||
}
|
||||
|
||||
override fun replaceReceiverTypeRef(newReceiverTypeRef: FirTypeRef?) {
|
||||
}
|
||||
|
||||
override fun replaceControlFlowGraphReference(newControlFlowGraphReference: FirControlFlowGraphReference?) {
|
||||
controlFlowGraphReference = newControlFlowGraphReference
|
||||
}
|
||||
|
||||
override fun replaceValueParameters(newValueParameters: List<FirValueParameter>) {
|
||||
valueParameters.clear()
|
||||
valueParameters.addAll(newValueParameters)
|
||||
}
|
||||
|
||||
override fun replaceBody(newBody: FirBlock?) {
|
||||
}
|
||||
|
||||
override fun replaceContractDescription(newContractDescription: FirContractDescription) {
|
||||
}
|
||||
}
|
||||
|
||||
val ALL_JAVA_OPERATION_NAMES =
|
||||
UNARY_OPERATION_NAMES + BINARY_OPERATION_NAMES + ASSIGNMENT_OPERATIONS + DELEGATED_PROPERTY_OPERATORS +
|
||||
EQUALS + COMPARE_TO + CONTAINS + INVOKE + ITERATOR + GET + SET + NEXT + HAS_NEXT
|
||||
|
||||
@FirBuilderDsl
|
||||
class FirJavaMethodBuilder : FirSimpleFunctionBuilder() {
|
||||
class FirJavaMethodBuilder : FirFunctionBuilder, FirTypeParametersOwnerBuilder, FirAnnotationContainerBuilder {
|
||||
override var source: FirSourceElement? = null
|
||||
override lateinit var session: FirSession
|
||||
override var attributes: FirDeclarationAttributes = FirDeclarationAttributes()
|
||||
override lateinit var returnTypeRef: FirTypeRef
|
||||
override val valueParameters: MutableList<FirValueParameter> = mutableListOf()
|
||||
override var body: FirBlock? = null
|
||||
lateinit var status: FirDeclarationStatus
|
||||
var dispatchReceiverType: ConeKotlinType? = null
|
||||
lateinit var name: Name
|
||||
lateinit var symbol: FirNamedFunctionSymbol
|
||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
||||
lateinit var visibility: Visibility
|
||||
var modality: Modality? = null
|
||||
var isStatic: Boolean by Delegates.notNull()
|
||||
override var resolvePhase: FirResolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES
|
||||
var resolvePhase: FirResolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES
|
||||
lateinit var annotationBuilder: () -> List<FirAnnotationCall>
|
||||
|
||||
@Deprecated("Modification of 'origin' has no impact for FirJavaFunctionBuilder", level = DeprecationLevel.HIDDEN)
|
||||
override var origin: FirDeclarationOrigin
|
||||
@@ -101,15 +210,12 @@ class FirJavaMethodBuilder : FirSimpleFunctionBuilder() {
|
||||
resolvePhase,
|
||||
attributes,
|
||||
returnTypeRef as FirJavaTypeRef,
|
||||
receiverTypeRef = null,
|
||||
typeParameters,
|
||||
valueParameters,
|
||||
body,
|
||||
name,
|
||||
status,
|
||||
containerSource,
|
||||
symbol,
|
||||
annotations,
|
||||
annotationBuilder,
|
||||
dispatchReceiverType,
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ class FirSignatureEnhancement(
|
||||
modality = firElement.modality
|
||||
isVar = firElement.isVar
|
||||
isStatic = firElement.isStatic
|
||||
annotations += firElement.annotations
|
||||
annotationBuilder = { firElement.annotations }
|
||||
status = firElement.status
|
||||
initializer = firElement.initializer
|
||||
dispatchReceiverType = firElement.dispatchReceiverType
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.java.JavaTypeParameterStack
|
||||
import org.jetbrains.kotlin.fir.java.enhancement.readOnlyToMutable
|
||||
import org.jetbrains.kotlin.fir.java.toConeKotlinTypeProbablyFlexible
|
||||
import org.jetbrains.kotlin.fir.resolve.fullyExpandedType
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.FirAbstractOverrideChecker
|
||||
@@ -35,8 +36,24 @@ class JavaOverrideChecker internal constructor(
|
||||
if (candidateType is ConeFlexibleType) return isEqualTypes(candidateType.lowerBound, baseType, substitutor, mayBeSpecialBuiltIn)
|
||||
if (baseType is ConeFlexibleType) return isEqualTypes(candidateType, baseType.lowerBound, substitutor, mayBeSpecialBuiltIn)
|
||||
if (candidateType is ConeClassLikeType && baseType is ConeClassLikeType) {
|
||||
return candidateType.lookupTag.classId.let { it.readOnlyToMutable() ?: it } ==
|
||||
baseType.lookupTag.classId.let { it.readOnlyToMutable() ?: it }
|
||||
val candidateTypeClassId = candidateType.fullyExpandedType(session).lookupTag.classId.let { it.readOnlyToMutable() ?: it }
|
||||
val baseTypeClassId = baseType.fullyExpandedType(session).lookupTag.classId.let { it.readOnlyToMutable() ?: it }
|
||||
if (candidateTypeClassId != baseTypeClassId) return false
|
||||
if (candidateTypeClassId == StandardClassIds.Array) {
|
||||
assert(candidateType.typeArguments.size == 1) {
|
||||
"Array type with unexpected number of type arguments: $candidateType"
|
||||
}
|
||||
assert(baseType.typeArguments.size == 1) {
|
||||
"Array type with unexpected number of type arguments: $baseType"
|
||||
}
|
||||
return isEqualArrayElementTypeProjections(
|
||||
candidateType.typeArguments.single(),
|
||||
baseType.typeArguments.single(),
|
||||
substitutor,
|
||||
mayBeSpecialBuiltIn
|
||||
)
|
||||
}
|
||||
return true
|
||||
}
|
||||
// TODO: handle the situation in more proper way
|
||||
// Typical case: class EnumMap<K extends Enum, V> implements Map<K, V>
|
||||
@@ -68,6 +85,20 @@ class JavaOverrideChecker internal constructor(
|
||||
mayBeSpecialBuiltIn
|
||||
)
|
||||
|
||||
private fun isEqualArrayElementTypeProjections(
|
||||
candidateTypeProjection: ConeTypeProjection,
|
||||
baseTypeProjection: ConeTypeProjection,
|
||||
substitutor: ConeSubstitutor,
|
||||
mayBeSpecialBuiltIn: Boolean
|
||||
): Boolean =
|
||||
when {
|
||||
candidateTypeProjection is ConeKotlinTypeProjection && baseTypeProjection is ConeKotlinTypeProjection ->
|
||||
candidateTypeProjection.kind == baseTypeProjection.kind &&
|
||||
isEqualTypes(candidateTypeProjection.type, baseTypeProjection.type, substitutor, mayBeSpecialBuiltIn)
|
||||
candidateTypeProjection is ConeStarProjection && baseTypeProjection is ConeStarProjection -> true
|
||||
else -> false
|
||||
}
|
||||
|
||||
private fun Collection<FirTypeParameterRef>.buildErasure() = associate {
|
||||
val symbol = it.symbol
|
||||
val firstBound = symbol.fir.bounds.first() // Note that in Java type parameter typed arguments always erased to first bound
|
||||
|
||||
+2
-2
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.fir.NoMutableState
|
||||
import org.jetbrains.kotlin.fir.resolve.calls.FirSyntheticNamesProvider
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.capitalizeAsciiOnly
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.decapitalizeAsciiOnly
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.toUpperCaseAsciiOnly
|
||||
|
||||
@NoMutableState
|
||||
@@ -91,7 +92,7 @@ object FirJavaSyntheticNamesProvider : FirSyntheticNamesProvider() {
|
||||
else -> return emptyList()
|
||||
}
|
||||
val withoutPrefix = identifier.removePrefix(prefix)
|
||||
val withoutPrefixName = Name.identifier(withoutPrefix.decapitalize())
|
||||
val withoutPrefixName = Name.identifier(withoutPrefix.decapitalizeAsciiOnly())
|
||||
return if (prefix == SETTER_PREFIX) {
|
||||
listOf(withoutPrefixName, Name.identifier(IS_PREFIX + withoutPrefix))
|
||||
} else {
|
||||
@@ -99,4 +100,3 @@ object FirJavaSyntheticNamesProvider : FirSyntheticNamesProvider() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.fir.scopes.jvm
|
||||
|
||||
import org.jetbrains.kotlin.fir.declarations.FirFunction
|
||||
import org.jetbrains.kotlin.fir.declarations.FirSimpleFunction
|
||||
import org.jetbrains.kotlin.fir.symbols.StandardClassIds
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.types.impl.FirImplicitAnyTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.impl.FirImplicitNullableAnyTypeRef
|
||||
@@ -101,8 +102,7 @@ private fun StringBuilder.appendConeType(coneType: ConeKotlinType) {
|
||||
|
||||
fun appendClassLikeType(type: ConeClassLikeType) {
|
||||
val classId = type.lookupTag.classId
|
||||
if (classId.shortClassName.isSpecial) return
|
||||
if (classId.shortClassName.identifier == "Array") {
|
||||
if (classId == StandardClassIds.Array) {
|
||||
append("[")
|
||||
type.typeArguments.forEach { typeArg ->
|
||||
when (typeArg) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+7
-2
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.fir.resolve.calls
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.buildConstructedClassTypeParameterRef
|
||||
@@ -23,6 +24,7 @@ import org.jetbrains.kotlin.fir.scopes.scopeForClass
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import java.util.*
|
||||
|
||||
private operator fun <T> Pair<T, *>?.component1() = this?.first
|
||||
private operator fun <T> Pair<*, T>?.component2() = this?.second
|
||||
@@ -184,10 +186,13 @@ private fun processConstructors(
|
||||
)
|
||||
} else basicScope
|
||||
}
|
||||
is FirClassSymbol ->
|
||||
(matchedSymbol.fir as FirClass<*>).scopeForClass(
|
||||
is FirClassSymbol -> {
|
||||
val firClass = matchedSymbol.fir as FirClass<*>
|
||||
if (firClass.classKind == ClassKind.INTERFACE) null
|
||||
else firClass.scopeForClass(
|
||||
substitutor, session, bodyResolveComponents.scopeSession
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: why don't we use declared member scope at this point?
|
||||
|
||||
+4
-1
@@ -534,13 +534,16 @@ class FirCallCompletionResultsWriterTransformer(
|
||||
syntheticCall: D,
|
||||
data: ExpectedArgumentType?,
|
||||
): CompositeTransformResult<FirStatement> where D : FirResolvable, D : FirExpression {
|
||||
syntheticCall.transformChildren(this, data?.getExpectedType(syntheticCall)?.toExpectedType())
|
||||
val calleeReference = syntheticCall.calleeReference as? FirNamedReferenceWithCandidate ?: return syntheticCall.compose()
|
||||
|
||||
val declaration = calleeReference.candidate.symbol.fir as? FirSimpleFunction ?: return syntheticCall.compose()
|
||||
|
||||
val typeRef = typeCalculator.tryCalculateReturnType(declaration)
|
||||
syntheticCall.replaceTypeRefWithSubstituted(calleeReference, typeRef)
|
||||
syntheticCall.transformChildren(
|
||||
this,
|
||||
data = data?.getExpectedType(syntheticCall)?.toExpectedType() ?: syntheticCall.typeRef.coneType.toExpectedType()
|
||||
)
|
||||
|
||||
return (syntheticCall.transformCalleeReference(
|
||||
StoreCalleeReference,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user