From 3c90299f2d36773081c7372e4b18446444a12852 Mon Sep 17 00:00:00 2001 From: Pavel Punegov Date: Sat, 28 Dec 2019 10:26:47 +0300 Subject: [PATCH] Kotlin compiler update 1.4.0-dev-445 (#3732) * Remove duplicate typeOrNull extension val * [kotlin compiler][update] 1.4.0-dev-445 4c04ad23714 FIR: Add bindings for dispatch receiver parameters a54ef3e4276 FIR invoke resolve: remove redundant candidates f47c3f0f5a1 FIR: if necessary, use explicit receiver as argument in invoke collector 0c88ecdc562 FIR resolve: introduce builtInExtensionFunctionReceiverValue de50f8aef3e FIR resolve: add partial support of extension lambda calls 49e94f1ee30 FIR invoke consumer: minor rename 9a514dfdd91 FIR invoke consumer: do not process last data twice 933bdc98e53 Minor: extract val FirTowerConsumer.resultCollection 20fee028f9b [FIR TEST] Add test with incorrect invoke receiver a8a50fa657e Fix raw FIR building with parenthesized expression as selector a18fecb05f3 Minor: mute test for pre-1.3 behavior in JVM_IR ee06678484c [JS BE] Fix `is` check with Function 04e567dbf9a [NI] Don't replace context dependency for blocks with expected type 4fa5e2d85c6 KT-20357: Add samples for linkedSetOf 95300ae31d4 KT-20357: Add sample for reduce, reduceRight and their indexed counterparts 6d092b5f714 Add more reduceOrNull tests 9546307243d Add sample for reduceOrNull and reduceRightOrNull 06008c40ab7 KT-33761 Add reduceRightOrNull f5d696d3c49 KT-33761 Add reduceOrNull 39e1b24c2c6 Don't search for expects when not given -Xmpp-klibs d210df9ea34 Update spec testdata according to previous commits 5dfe100ae5f Allow use reference to reified type parameters in contracts since 1.4 9c1b68f8394 Prohibit using references to this from outer scope in contract declarations f083edfac28 Allow contracts on final non-override members since 1.4 5a9070b6dab as40: Minor: Fix copyright header in AbstractModelBuilderTest.java 3d79e4609ea as40: Fix duplicate registration of kotlin-copyright 7b1c4e72baf Build: Fix android-wizardTemplate-plugin dependencies 1a3cf3b7925 [Gradle, Native] Added subspecs support in CocoaPods plugin 8871c8b4fd2 Migrate diagnostic tests to 1.4 07d35a3ad16 Fix template indentation (#2923) d3f63166f3c [JPS] Include Kotlin reflection for `tests-spec` though explicit specifying in gradle dependencies babe6eb581f Fix explicit 'equals' for primitive types 1d5370a56a1 Fix rationale for test muted in JVM_IR (see KT-35656) 7898922066a NI: Fix type mismatch caused by smartcast ae4397fbfb4 Fix bare typed smartcasts in NI abee908b94b Remove effectively dead code in AbstractTypeCheckerContext 0b385cc5328 NI: Approximate captured-for-star-projections to * 7728102a773 Cleanup and reformart DelegatedPropertyResolver.kt c8a1b876e8b [NI] Fix completion of error delegates with receiver with type parameters e83941a98e9 [NI] Don't resolve delegates twice 0c01499d98d [NI] Improve completing calls with multiple postponed arguments 0aa527347d0 Stubs don't break KtTypeAlias::isTopLevel 08454aa47e8 Minor: add reference to language design issue 2dd8727baf0 [JVM IR] ForLoopsLowering: Keep IMPLICIT_NOTNULL type-casts in `next()` and `componentN()` calls. e54ef3bdb84 PSI2IR: ignore enum annotation arguments of error type a9848305a34 Build: Use tar.gz extension for linux AS distributions d8d21b0cba8 as40: Fix test compilation for AS 4.0 C7 89a259837f0 as40: Fix KotlinDslScriptModelProvider and KotlinDslScriptModelResolver for AS 4.0 C7 68f1d91e1bc as40: Upgrade to AS 4.0 C7 eda27ab2989 Build: Add Ide.AS40 constant 19233ee1207 Build: Add as40 to .bunch 5fe06ceb064 Pill: Support api/implementation configurations 4309f53e114 NI: don't filter flexible types during CST calculation and force return as result the first of such types ^KT-35658 Fixed 51424ec5984 [NI] Add constraint `K <: T` from constraint `K <: CapturedType(in T)` b54169d3128 [NI] Fix substitution in completion of callable references in coroutine inference 04d4366f2a9 [NI] Update testdata broken in NI 6ca0df59c1e [FIR-TEST] Fail old FE diagnostics test if testdata doesn't exist 77e4212774b [minor] unmute fixed spec tests 7ee71450bc5 [NI] Discriminate `Nothing?` result type from nullability constraints a1ad680edb0 [NI] Disallow full completion based on lower Nothing constraint 384bd858e9f [NI] Support fixation to subtype in completion mode calculator e69e45e2a6f [NI] Remove direcion calculator from variable fixation e9941f8c12d [NI] Implement algorithm for completion mode selection a9391c8dfb9 [NI] Remove Nothing result type restriction in most cases ae1630f3765 [NI] Don't discriminate `Nothing`-type from resulting ones a8e9a6a1d07 Properly reference type parameter descriptors f8fd5092c69 [native-gradle-plugin] Disabled cache building for iOS devices 70ff3d36d03 Fix running tests in compiler plugins 5583b57ed75 Regenerate spec tests to activate muting framework for them 7a94b1d88bf Mute SpringReferenceNavigationTestGenerated test 2f129ea4354 Allow resolve during fixing AddSpringBeanQualifierFix action bf79b660c4d Fix HighlightingWithDependentLibrariesTest in 193 by using relative path 1b9bae0ccad Mute more flaky tests d575df56e98 Minor: show method key in parse error 143cfc70302 Minor: put first actual item to the new line in tests 9b680082080 Mute JvmSmartCompletionTestGenerated (KT-32919) c372dc7f0a2 Fix AmbiguousCalls in >= 192 08846816628 Mute flaky stub builder tests 1e14c48742e Mute KotlinMavenInspectionTestGenerated 9206f1cfb2d Remove compatibility hack with reflection usage 1682ace428f Mute MultiPlatformHighlightingTestGenerated 3210e1d44c1 Fix testHighlightingWithDependentLibraries 03bd80b1ba8 Mute CreateActual.testWithTestDummy d2909814c21 Mute DeprecatedSymbolUsageFixSpecialTest d80fdf307f4 Fix testNoSynthesizedParameterNames in 192 and 193 dca5ff10c77 Mute testKotlin_moveTopLevelDeclarations_moveFunctionToPackage_MoveFunctionToPackage in 193 6613b73657d Mute highlighting tests 1e3736ec1ed Mute SerializationIrBytecodeListingTestGenerated 1058f04c536 Mute ShortenRefsTestGenerated 84604b91bf1 Mute StringInterpolationInjectionTest c11f36cf1d4 Mute IncrementalJvmJpsTestGenerated tests 18b1d64adc8 Update FindUsagesTestGenerated$Kotlin$Conventions.testSet test data 3520d5b81dd Mute JavaAgainstKotlinBinariesCheckerTestGenerated tests in 192 and 193 5f25242cbfd Mute QuickFixTestGenerated.Libraries tests 712517a02e0 Mute testWithJava9ModuleInfo tests f41b588f704 Mute gradle.NewMultiplatformProjectImportingTest tests 08ade450ff4 Mute gradle.ImportAndCheckHighlighting (KT-35631) c848212ae94 Mute GradleBuildFileHighlightingTest test c935078f055 Mute JavaToKotlinConverterSingleFileTestGenerated tests c5d4213a5cb Mute CoroutineDumpTestGenerated, stable failure on windows 9d54d1ec405 Mute GradleFacetImportTest tests in 192 and 193 482cb074201 Mute GradleConfiguratorTest tests 8014a6509e6 Allow to mute JUnit 4 tests with parameters d74721716a0 [JS IR] Use short klib names instead of absolute paths 31c84e9ac4d [JS IR] Build stdlib using compiler from repo 70111f8db1f Ignore test in Native backend be8ae24713c Temporary mute some spec tests through apply changes after 45e881f03f642740ef53024b0f3440352a47ccc4 1129b2d3eb8 Support serializing a module's own descriptors without dependencies ed6034e4490 Support generating a klib from common code with K2MetadataCompiler 28e00892592 Allow not providing IR to serialize a klib with just the frontend metadata cea0f080490 Regenerate compiler tests 45d894ee6eb K/N: remove unused code 84e8b895bed Minor: Fix compilation warnings 59e84e826bb Fast check of Kotlin/Native KLIBs by virtual files 98e9642a1ec Stop publishing old KLIB reader 4afbbda858a Minor fixes of move refactoring a2db1f8314d Fix move tests for bunch 192 f2f7d144aab [JS] Fix failing test 6ba8fbd4519 [IR BE] Refactored FoldConstantLowering e4f83b96a3a [JS BE] Reduce temporary variable number produced during lowering fb3bd8a9ac1 [JS BE] Implement accessor inlining optimization (WIP) - enable constant folding 9871f8c5793 [JS BE] Fix DCE to let it remove constant properties 2c94f590ca2 [JS BE] Improve error message in JS BE 738db7e511b [IR BE] Make FoldConstantLowering common 540b3cfec3d [JS IR] Fix test to make them able to run with JS b5af28b28d5 [JS IR] Fix state machine builder to fit into switch optimizer requirements 50889e77a86 [JS IR] Support switch optimization for when-expression 23caf15457b [JS IR] Implement Switch optimizer for JS IR codegen 8dd467bde0a Fix build for bunch 191 982a088f002 JVM_IR: do not copy defaults in functions with inline class parameters 9e17140dafb [JS_IR] Turned on passing JS_IR tests 7a5e8b43161 [IR] Inliner: supported tricky function references cdf9ef63ba5 Remove nullability assertions from special bridge call arguments fabeca59555 Redundant curly braces in string template: do not report labeled 'this' 80d29cdad19 FIR resolve: soften processBlock limitation during inference completion fd73f5af20d FIR: simplify problematic test 03ec76b570b Redundant visibility modifier: do not report for 'internal' inside 'private' 49e5f170d1d "Replace 'when' with 'if'" intention: do not suggest if 'when' subject is variable declaration 1cdcef3b089 "Split property declaration" intention: do not suggest in 'when' subject eab68642695 KT-35536: Fix enum constants in KAPT 62924ddcd4c KT-35472: Detect when content of annotation processor changes 7b227f31138 Remove Redundant Project d4b0151f51b JVM_IR: fix name of received field for suspend lambdas 068d3f4beb5 JVM_IR: Use IrInlineReferenceLocator to find inline suspend lambdas and lambdas, which capture crossinline 1ea89ce28ed JVM_IR: Minor. Unmute tests 5c92da3f35b JVM_IR: Do not generate parameter annotations for continuation constructors 9292022f880 JVM_IR: Support inner lambdas which capture crossinline daa76cbf1e4 JVM_IR: Support inner objects with multiple suspend functions a1448ebb371 JVM_IR: Support crossinline suspend lambdas 3b37f6bd32c JVM_IR: Add attributes to named suspend functions 0f1592b0235 Remove deprecated method usage 6fb788d446d Fix move refactoring for several class files 51f726be9bd JVM_IR: Fix check for whether classes are from Java. e261b1e2de5 JVM IR: Fix line numbers in callable reference classes 59f2aa7addc JVM_IR: remove constructors of nested annotations 17d2fda9465 JVM_IR: keep nullability when remapping type parameters 1b95040934d [kotlin-native-plugin] Two fixes: * Added property to select the cache kind (none, dynamic, static) * Fixed the check if the cache needs to be rebuilt e0782827673 Fix ambiguity between Java and Kotlin SAM candidates 99e02665b51 Add forgotten FIR test data for old FE test 81ac46d35dd Fix FIR test data for old FE test 74889ef3ad8 [Gradle, JS] Actualize node and yarn version 24e3310393a [Gradle, JS] Add check on run and dist task fefdce04066 KT-35550 Generate type parameters for delegating property accessors --- .../src/org/jetbrains/kotlin/ir/util/IrUtils2.kt | 2 -- gradle.properties | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt index 41d5527d15d..8aed75315fb 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt @@ -395,8 +395,6 @@ fun IrValueParameter.copy(newDescriptor: ParameterDescriptor): IrValueParameter ) } -val IrTypeArgument.typeOrNull: IrType? get() = (this as? IrTypeProjection)?.type - val IrType.isSimpleTypeWithQuestionMark: Boolean get() = this is IrSimpleType && this.hasQuestionMark diff --git a/gradle.properties b/gradle.properties index 9fe2ce0b52b..ba7903f71db 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,12 +18,12 @@ buildKotlinVersion=1.3.70-dev-1070 buildKotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.3.70-dev-1070,branch:default:any,pinned:true/artifacts/content/maven remoteRoot=konan_tests -kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.4.0-dev-216,branch:default:any,pinned:true/artifacts/content/maven -kotlinVersion=1.4.0-dev-216 -kotlinStdlibRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.3.70-dev-2841,branch:default:any,pinned:true/artifacts/content/maven -kotlinStdlibVersion=1.4.0-dev-216 -kotlinStdlibTestsVersion=1.4.0-dev-216 -testKotlinCompilerVersion=1.4.0-dev-216 +kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.4.0-dev-445,branch:default:any,pinned:true/artifacts/content/maven +kotlinVersion=1.4.0-dev-445 +kotlinStdlibRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.4.0-dev-445,branch:default:any,pinned:true/artifacts/content/maven +kotlinStdlibVersion=1.4.0-dev-445 +kotlinStdlibTestsVersion=1.4.0-dev-445 +testKotlinCompilerVersion=1.4.0-dev-445 konanVersion=1.4.0 # A version of Xcode required to build the Kotlin/Native compiler.