Merge "Kotlin 1.6.0" into androidx-main
diff --git a/annotation/annotation-experimental-lint/integration-tests/src/main/java/sample/optin/RegressionTestKotlin193110413.kt b/annotation/annotation-experimental-lint/integration-tests/src/main/java/sample/optin/RegressionTestKotlin193110413.kt
index a4c9ab3..4d6a838 100644
--- a/annotation/annotation-experimental-lint/integration-tests/src/main/java/sample/optin/RegressionTestKotlin193110413.kt
+++ b/annotation/annotation-experimental-lint/integration-tests/src/main/java/sample/optin/RegressionTestKotlin193110413.kt
@@ -38,7 +38,7 @@
      */
     @OptIn(ExperimentalKotlinAnnotation::class)
     internal class Foo : ExperimentalInterface {
-        @Suppress("EXPERIMENTAL_ANNOTATION_ON_OVERRIDE_WARNING")
+        @Suppress("EXPERIMENTAL_ANNOTATION_ON_OVERRIDE")
         @ExperimentalKotlinAnnotation
         override fun experimentalMethod() {
             // Stub!
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/dackka/DackkaTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/dackka/DackkaTask.kt
index f98b306..bc1df9c 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/dackka/DackkaTask.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/dackka/DackkaTask.kt
@@ -174,7 +174,7 @@
 }
 
 @Suppress("UnstableApiUsage")
-abstract class DackkaWorkAction @Inject constructor (
+abstract class DackkaWorkAction @Inject constructor(
     private val execOperations: ExecOperations
 ) : WorkAction<DackkaParams> {
     override fun execute() {
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/doclava/DoclavaTask.kt b/buildSrc/private/src/main/kotlin/androidx/build/doclava/DoclavaTask.kt
index 6413a35..67e3c24 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/doclava/DoclavaTask.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/doclava/DoclavaTask.kt
@@ -272,7 +272,7 @@
     }
 }
 
-abstract class DoclavaWorkAction @Inject constructor (
+abstract class DoclavaWorkAction @Inject constructor(
     private val execOperations: ExecOperations
 ) : WorkAction<DoclavaParams> {
     override fun execute() {
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt b/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
index c7090c2..758de0f 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
@@ -62,7 +62,7 @@
     val metalavaClasspath: SetProperty<File>
 }
 
-abstract class MetalavaWorkAction @Inject constructor (
+abstract class MetalavaWorkAction @Inject constructor(
     private val execOperations: ExecOperations
 ) : WorkAction<MetalavaParams> {
     override fun execute() {
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt
index 0715353..5d7055a 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt
@@ -24,6 +24,7 @@
 import org.jetbrains.kotlin.backend.common.ir.BuiltinSymbolsBase
 import org.jetbrains.kotlin.backend.common.ir.createParameterDeclarations
 import org.jetbrains.kotlin.backend.jvm.JvmGeneratorExtensionsImpl
+import org.jetbrains.kotlin.backend.jvm.JvmIrTypeSystemContext
 import org.jetbrains.kotlin.backend.jvm.JvmNameProvider
 import org.jetbrains.kotlin.backend.jvm.serialization.JvmIdSignatureDescriptor
 import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
@@ -35,17 +36,16 @@
 import org.jetbrains.kotlin.descriptors.ModuleDescriptor
 import org.jetbrains.kotlin.descriptors.konan.DeserializedKlibModuleOrigin
 import org.jetbrains.kotlin.descriptors.konan.KlibModuleOrigin
+import org.jetbrains.kotlin.ir.IrBuiltIns
 import org.jetbrains.kotlin.ir.IrElement
+import org.jetbrains.kotlin.ir.backend.jvm.serialization.JvmDescriptorMangler
 import org.jetbrains.kotlin.ir.backend.jvm.serialization.JvmIrLinker
-import org.jetbrains.kotlin.ir.backend.jvm.serialization.JvmManglerDesc
 import org.jetbrains.kotlin.ir.builders.TranslationPluginContext
 import org.jetbrains.kotlin.ir.builders.declarations.buildClass
 import org.jetbrains.kotlin.ir.declarations.IrClass
 import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
 import org.jetbrains.kotlin.ir.declarations.IrModuleFragment
 import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl
-import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
-import org.jetbrains.kotlin.ir.descriptors.IrFunctionFactory
 import org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator
 import org.jetbrains.kotlin.ir.util.IrMessageLogger
 import org.jetbrains.kotlin.ir.util.ReferenceSymbolTable
@@ -380,7 +380,7 @@
                 myTestRootDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES
             ).also { setupEnvironment(it) }
 
-            val mangler = JvmManglerDesc(null)
+            val mangler = JvmDescriptorMangler(null)
 
             val psi2ir = Psi2IrTranslator(
                 environment.configuration.languageVersionSettings,
@@ -399,7 +399,7 @@
                 analysisResult.throwIfError()
                 AnalyzingUtils.throwExceptionOnErrors(analysisResult.bindingContext)
             }
-            val extensions = JvmGeneratorExtensionsImpl()
+            val extensions = JvmGeneratorExtensionsImpl(configuration)
             val generatorContext = psi2ir.createGeneratorContext(
                 analysisResult.moduleDescriptor,
                 analysisResult.bindingContext,
@@ -409,12 +409,8 @@
             val stubGenerator = DeclarationStubGeneratorImpl(
                 generatorContext.moduleDescriptor,
                 generatorContext.symbolTable,
-                generatorContext.irBuiltIns.languageVersionSettings,
-                extensions
-            )
-            val functionFactory = IrFunctionFactory(
                 generatorContext.irBuiltIns,
-                generatorContext.symbolTable
+                extensions
             )
             val frontEndContext = object : TranslationPluginContext {
                 override val moduleDescriptor: ModuleDescriptor
@@ -426,13 +422,11 @@
                 override val irBuiltIns: IrBuiltIns
                     get() = generatorContext.irBuiltIns
             }
-            generatorContext.irBuiltIns.functionFactory = functionFactory
             val irLinker = JvmIrLinker(
                 generatorContext.moduleDescriptor,
                 messageLogger,
-                generatorContext.irBuiltIns,
+                JvmIrTypeSystemContext(generatorContext.irBuiltIns),
                 generatorContext.symbolTable,
-                functionFactory,
                 frontEndContext,
                 stubGenerator,
                 mangler
@@ -441,15 +435,18 @@
             generatorContext.moduleDescriptor.allDependencyModules.map {
                 val capability = it.getCapability(KlibModuleOrigin.CAPABILITY)
                 val kotlinLibrary = (capability as? DeserializedKlibModuleOrigin)?.library
-                irLinker.deserializeIrModuleHeader(it, kotlinLibrary)
+                irLinker.deserializeIrModuleHeader(
+                    it,
+                    kotlinLibrary,
+                    _moduleName = it.name.asString()
+                )
             }
 
             val irProviders = listOf(irLinker)
 
             val symbols = BuiltinSymbolsBase(
                 generatorContext.irBuiltIns,
-                generatorContext.moduleDescriptor.builtIns,
-                generatorContext.symbolTable.lazyWrapper
+                symbolTable,
             )
 
             ExternalDependenciesGenerator(
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/FcsTypeResolutionTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/FcsTypeResolutionTests.kt
index 26d3ae7..8b14e7a 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/FcsTypeResolutionTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/FcsTypeResolutionTests.kt
@@ -495,8 +495,8 @@
                 MultiChildren { x, y ->
                     println(x + y)
                 }
-                <!NONE_APPLICABLE!>MultiChildren<!> { x, 
-                y, z ->
+                <!NONE_APPLICABLE!>MultiChildren<!> { <!CANNOT_INFER_PARAMETER_TYPE!>x<!>,
+                <!CANNOT_INFER_PARAMETER_TYPE!>y<!>, <!CANNOT_INFER_PARAMETER_TYPE!>z<!> ->
                     println(x + y + z)
                 }
             }
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/GenerationUtils.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/GenerationUtils.kt
index a7d631d..0df3b5e 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/GenerationUtils.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/GenerationUtils.kt
@@ -81,6 +81,7 @@
         ).codegenFactory(
             if (configuration.getBoolean(JVMConfigurationKeys.IR))
                 JvmIrCodegenFactory(
+                    configuration,
                     configuration.get(CLIConfigurationKeys.PHASE_CONFIG)
                         ?: PhaseConfig(jvmPhases)
                 )
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/SanityCheckCodegenTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/SanityCheckCodegenTests.kt
index 42eba74..237d15f 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/SanityCheckCodegenTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/SanityCheckCodegenTests.kt
@@ -32,4 +32,29 @@
         """
         )
     }
+
+    // Regression test, because we didn't have a test to catch a breakage introduced by
+    // https://github.com/JetBrains/kotlin/commit/ae608ea67fc589c4472657dc0317e97cb67dd158
+    fun testNothings() = ensureSetup {
+        testCompile(
+            """
+                import androidx.compose.runtime.Composable
+
+                @Composable
+                fun NothingToUnit(): Unit {
+                    return error("")
+                }
+
+                @Composable
+                fun NothingToNothing(): Nothing {
+                    return error("")
+                }
+
+                @Composable
+                fun NullableNothing(condition: Boolean): Nothing? {
+                    return (if(condition) error("") else null)
+                }
+        """
+        )
+    }
 }
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/analysis/ComposableDeclarationCheckerTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/analysis/ComposableDeclarationCheckerTests.kt
index a6c61d4..cd14801 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/analysis/ComposableDeclarationCheckerTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/analysis/ComposableDeclarationCheckerTests.kt
@@ -120,7 +120,7 @@
                 val composableLambda = @Composable {}
                 acceptSuspend <!TYPE_MISMATCH!>@Composable {}<!>
                 acceptComposableSuspend @Composable {}
-                acceptComposableSuspend(<!UNSUPPORTED_FEATURE!>composableLambda<!>)
+                acceptComposableSuspend(composableLambda)
                 acceptSuspend(<!COMPOSABLE_SUSPEND_FUN, TYPE_MISMATCH!>@Composable suspend fun() { }<!>)
             }
         """
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/debug/AbstractDebuggerTest.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/debug/AbstractDebuggerTest.kt
index cbd404a..c63ff7c 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/debug/AbstractDebuggerTest.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/debug/AbstractDebuggerTest.kt
@@ -61,7 +61,7 @@
 
     override fun setUp() {
         super.setUp()
-        if (proxyPort == -1) throw error("initialize method must be called on AbstractDebuggerTest")
+        if (proxyPort == -1) error("initialize method must be called on AbstractDebuggerTest")
         createMethodEventsForTestClass()
     }
 
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposePlugin.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposePlugin.kt
index 6bbd5a2..0095ce0 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposePlugin.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposePlugin.kt
@@ -187,7 +187,7 @@
             project: Project,
             configuration: CompilerConfiguration
         ) {
-            val KOTLIN_VERSION_EXPECTATION = "1.5.31"
+            val KOTLIN_VERSION_EXPECTATION = "1.6.0"
             KotlinCompilerVersion.getVersion()?.let { version ->
                 val suppressKotlinVersionCheck = configuration.get(
                     ComposeConfiguration.SUPPRESS_KOTLIN_VERSION_COMPATIBILITY_CHECK,
@@ -257,7 +257,7 @@
                 project,
                 ComposeDiagnosticSuppressor()
             )
-            @Suppress("EXPERIMENTAL_API_USAGE_FUTURE_ERROR")
+            @Suppress("EXPERIMENTAL_API_USAGE_ERROR")
             TypeResolutionInterceptor.registerExtension(
                 project,
                 @Suppress("IllegalExperimentalApiUsage")
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/Stability.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/Stability.kt
index 649315b..4117381 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/Stability.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/Stability.kt
@@ -184,6 +184,9 @@
                 }
             }
             is Stability.Runtime -> parts.add(stability)
+            is Stability.Unknown -> {
+                /* do nothing */
+            }
         }
     }
     return Stability.Combined(parts)
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/AbstractComposeLowering.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/AbstractComposeLowering.kt
index c8881b5..285ddca 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/AbstractComposeLowering.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/AbstractComposeLowering.kt
@@ -27,6 +27,7 @@
 import androidx.compose.compiler.plugins.kotlin.irTrace
 import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
 import org.jetbrains.kotlin.backend.common.lower.DeclarationIrBuilder
+import org.jetbrains.kotlin.backend.jvm.ir.isInlineClassType
 import org.jetbrains.kotlin.builtins.extractParameterNameFromFunctionTypeArgument
 import org.jetbrains.kotlin.builtins.functions.FunctionInvokeDescriptor
 import org.jetbrains.kotlin.builtins.getReceiverTypeFromFunctionType
@@ -62,7 +63,6 @@
 import org.jetbrains.kotlin.ir.builders.irBlockBody
 import org.jetbrains.kotlin.ir.declarations.IrAnnotationContainer
 import org.jetbrains.kotlin.ir.declarations.IrClass
-import org.jetbrains.kotlin.ir.declarations.IrConstructor
 import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
 import org.jetbrains.kotlin.ir.declarations.IrField
 import org.jetbrains.kotlin.ir.declarations.IrFunction
@@ -134,7 +134,6 @@
 import org.jetbrains.kotlin.ir.util.getPrimitiveArrayElementType
 import org.jetbrains.kotlin.ir.util.isCrossinline
 import org.jetbrains.kotlin.ir.util.isFunction
-import org.jetbrains.kotlin.ir.util.isInlined
 import org.jetbrains.kotlin.ir.util.isNoinline
 import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
 import org.jetbrains.kotlin.name.FqName
@@ -829,10 +828,6 @@
         val getIteratorFunction = subject.type.classOrNull!!.owner.functions
             .single { it.name.asString() == "iterator" }
 
-        if (getIteratorFunction is IrConstructor) {
-            throw AssertionError("Should be IrConstructorCall: ${getIteratorFunction.descriptor}")
-        }
-
         val iteratorType = iteratorSymbol.typeWith(elementType)
         val nextSymbol = iteratorSymbol.owner.functions
             .single { it.descriptor.name.asString() == "next" }
@@ -1093,7 +1088,7 @@
     fun IrConstructorCall.isStatic(): Boolean {
         // special case constructors of inline classes as static if their underlying
         // value is static.
-        if (type.isInlined()) {
+        if (type.isInlineClassType()) {
             return stabilityOf(type.unboxInlineClass()).knownStable() &&
                 getValueArgument(0)?.isStatic() == true
         }
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunInterfaceLowering.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunInterfaceLowering.kt
index 1292ab5..72f9803 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunInterfaceLowering.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunInterfaceLowering.kt
@@ -23,6 +23,7 @@
 import org.jetbrains.kotlin.ir.expressions.IrFunctionExpression
 import org.jetbrains.kotlin.ir.expressions.IrTypeOperator
 import org.jetbrains.kotlin.ir.expressions.IrTypeOperatorCall
+import org.jetbrains.kotlin.ir.types.IrTypeSystemContextImpl
 import org.jetbrains.kotlin.ir.types.classOrNull
 import org.jetbrains.kotlin.ir.util.isLambda
 import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid
@@ -69,7 +70,7 @@
                 currentDeclarationParent!!,
                 context,
                 currentScope!!.scope.scopeOwnerSymbol,
-                context.irBuiltIns
+                IrTypeSystemContextImpl(context.irBuiltIns)
             ).build()
         }
         return super.visitTypeOperator(expression)
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
index 873c28c..95eadcc 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
@@ -129,6 +129,7 @@
 import org.jetbrains.kotlin.ir.types.isLong
 import org.jetbrains.kotlin.ir.types.isNothing
 import org.jetbrains.kotlin.ir.types.isNullableAny
+import org.jetbrains.kotlin.ir.types.isNullableNothing
 import org.jetbrains.kotlin.ir.types.isShort
 import org.jetbrains.kotlin.ir.types.isUnit
 import org.jetbrains.kotlin.ir.types.makeNullable
@@ -1554,7 +1555,7 @@
             index = 1,
             annotations = Annotations.EMPTY,
             name = KtxNameConventions.CHANGED_PARAMETER,
-            outType = builtIns.int,
+            outType = builtIns.intType.toKotlinType(),
             declaresDefaultValue = false,
             isCrossinline = false,
             isNoinline = false,
@@ -1728,7 +1729,10 @@
         while (expr != null && block != null) {
             if (expr is IrReturn) {
                 block.statements.pop()
-                return if (expr.value.type.isUnitOrNullableUnit()) {
+                return if (expr.value.type.isUnitOrNullableUnit() ||
+                    expr.value.type.isNothing() ||
+                    expr.value.type.isNullableNothing()
+                ) {
                     block.statements.add(expr.value)
                     original to null
                 } else {
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/FunctionReferenceBuilder.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/FunctionReferenceBuilder.kt
index c8cb7de..0eb6bb1 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/FunctionReferenceBuilder.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/FunctionReferenceBuilder.kt
@@ -37,13 +37,13 @@
 import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent
 import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction
 import org.jetbrains.kotlin.ir.declarations.copyAttributes
-import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
 import org.jetbrains.kotlin.ir.expressions.IrExpression
 import org.jetbrains.kotlin.ir.expressions.IrFunctionExpression
 import org.jetbrains.kotlin.ir.expressions.impl.IrInstanceInitializerCallImpl
 import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
 import org.jetbrains.kotlin.ir.symbols.IrSymbol
 import org.jetbrains.kotlin.ir.types.IrType
+import org.jetbrains.kotlin.ir.types.IrTypeSystemContext
 import org.jetbrains.kotlin.ir.util.constructors
 import org.jetbrains.kotlin.ir.util.defaultType
 import org.jetbrains.kotlin.ir.util.explicitParameters
@@ -59,7 +59,7 @@
     private val currentDeclarationParent: IrDeclarationParent,
     private val generatorContext: IrGeneratorContext,
     private val currentScopeOwnerSymbol: IrSymbol,
-    private val irBuiltIns: IrBuiltIns
+    private val irTypeSystemContext: IrTypeSystemContext
 ) {
     private val callee = irFunctionExpression.function
     private val superMethod =
@@ -85,7 +85,7 @@
         irBlock(irFunctionExpression.startOffset, irFunctionExpression.endOffset) {
             val constructor = createConstructor()
             createInvokeMethod()
-            functionReferenceClass.addFakeOverrides(irBuiltIns)
+            functionReferenceClass.addFakeOverrides(irTypeSystemContext)
             +functionReferenceClass
             +irCall(constructor.symbol)
         }
@@ -97,7 +97,7 @@
             returnType = functionReferenceClass.defaultType
             isPrimary = true
         }.apply {
-            val constructor = irBuiltIns.anyClass.owner.constructors.single()
+            val constructor = irTypeSystemContext.irBuiltIns.anyClass.owner.constructors.single()
             body = DeclarationIrBuilder(generatorContext, symbol).run {
                 irBlockBody(startOffset, endOffset) {
                     +irDelegatingConstructorCall(constructor)
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/IrSourcePrinter.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/IrSourcePrinter.kt
index e9ee195..bfe53c8 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/IrSourcePrinter.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/IrSourcePrinter.kt
@@ -19,6 +19,7 @@
 import androidx.compose.compiler.plugins.kotlin.KtxNameConventions
 import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
 import org.jetbrains.kotlin.descriptors.Modality
+import org.jetbrains.kotlin.ir.IrBuiltIns
 import org.jetbrains.kotlin.ir.IrElement
 import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
 import org.jetbrains.kotlin.ir.declarations.IrAnnotationContainer
@@ -39,7 +40,6 @@
 import org.jetbrains.kotlin.ir.declarations.IrTypeParameter
 import org.jetbrains.kotlin.ir.declarations.IrValueParameter
 import org.jetbrains.kotlin.ir.declarations.IrVariable
-import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
 import org.jetbrains.kotlin.ir.expressions.IrBlock
 import org.jetbrains.kotlin.ir.expressions.IrBlockBody
 import org.jetbrains.kotlin.ir.expressions.IrBranch
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/decoys/DecoyTransformBase.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/decoys/DecoyTransformBase.kt
index 68a929f..b262d6f 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/decoys/DecoyTransformBase.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/decoys/DecoyTransformBase.kt
@@ -56,22 +56,22 @@
 
     fun IrFunction.getSignatureId(): Long {
         val signature = symbol.signature
-            ?: signatureBuilder.composeSignatureForDeclaration(this)
+            ?: signatureBuilder.composeSignatureForDeclaration(this, false)
 
         return signature.getSignatureId()
     }
 
     private fun IdSignature.getSignatureId(): Long {
         return when (this) {
-            is IdSignature.PublicSignature -> id!!
             is IdSignature.AccessorSignature -> accessorSignature.id!!
             is IdSignature.FileLocalSignature -> id
             is IdSignature.ScopeLocalDeclaration -> id.toLong()
             is IdSignature.SpecialFakeOverrideSignature -> memberSignature.getSignatureId()
-            is IdSignature.GlobalFileLocalSignature -> TODO()
             is IdSignature.LoweredDeclarationSignature -> TODO()
             is IdSignature.FileSignature -> TODO()
-            is IdSignature.GlobalScopeLocalDeclaration -> TODO()
+            is IdSignature.CommonSignature -> id!!
+            is IdSignature.CompositeSignature -> this.getSignatureId()
+            is IdSignature.LocalSignature -> this.getSignatureId()
         }
     }
 
@@ -111,7 +111,7 @@
             "Could not find local implementation for $implementationName"
         }
         // top-level
-        val idSig = IdSignature.PublicSignature(
+        val idSig = IdSignature.CommonSignature(
             packageFqName = signature[0],
             declarationFqName = signature[1],
             id = signature[2].toLongOrNull(),
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/decoys/RecordDecoySignaturesTransformer.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/decoys/RecordDecoySignaturesTransformer.kt
index 6ec62f2..ab138c0 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/decoys/RecordDecoySignaturesTransformer.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/decoys/RecordDecoySignaturesTransformer.kt
@@ -69,7 +69,7 @@
             symbolRemapper.getReferencedFunction(declaration.getComposableForDecoy())
         val sig =
             signatureBuilder.computeSignature(decoyFunction.owner)
-                as? IdSignature.PublicSignature
+                as? IdSignature.CommonSignature
 
         if (sig != null) {
             decoyAnnotation.putValueArgument(
@@ -91,5 +91,5 @@
     }
 
     private fun IrDeclaration.canBeLinkedAgainst(): Boolean =
-        mangler.run { this@canBeLinkedAgainst.isExported() }
+        mangler.run { this@canBeLinkedAgainst.isExported(false) }
 }
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/ColorModel.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/ColorModel.kt
index 1bd7cdd..6aa7143 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/ColorModel.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/colorspace/ColorModel.kt
@@ -29,7 +29,7 @@
  */
 @Suppress("INLINE_CLASS_DEPRECATED", "EXPERIMENTAL_FEATURE_WARNING")
 @Immutable
-inline class ColorModel internal constructor (
+inline class ColorModel internal constructor(
     /**
      * pack both the number of components and an ordinal value to distinguish between
      * different ColorModel types that have the same number of components
diff --git a/compose/ui/ui-inspection/build.gradle b/compose/ui/ui-inspection/build.gradle
index 168ffdf..8c5d72a 100644
--- a/compose/ui/ui-inspection/build.gradle
+++ b/compose/ui/ui-inspection/build.gradle
@@ -92,7 +92,6 @@
 
 tasks.withType(KotlinCompile).configureEach {
     kotlinOptions {
-        useIR = true
         freeCompilerArgs += [
                 "-Xopt-in=kotlin.RequiresOptIn",
                 "-P", "plugin:androidx.compose.compiler.plugins.kotlin:sourceInformation=true"
diff --git a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt
index 5fde936..8d850b1 100644
--- a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt
+++ b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt
@@ -23,6 +23,7 @@
 import android.view.MotionEvent.ACTION_UP
 import android.view.View
 import androidx.compose.runtime.remember
+import androidx.compose.ui.ExperimentalComposeUiApi
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.composed
 import androidx.compose.ui.geometry.Offset
@@ -311,7 +312,6 @@
     val pointerInputFilter: PointerInputFilter
 ) : LogEntry()
 
-@Suppress("EXPERIMENTAL_API_USAGE_FUTURE_ERROR")
 internal fun internalPointerEventOf(vararg changes: PointerInputChange): InternalPointerEvent {
     val event = if (changes.any { it.changedToUpIgnoreConsumed() }) {
         MotionEventUp
@@ -320,6 +320,7 @@
     }
 
     val pointers = changes.map {
+        @OptIn(ExperimentalComposeUiApi::class)
         PointerInputEventData(
             id = it.id,
             uptime = it.uptimeMillis,
@@ -352,7 +353,7 @@
         PointerType.Mouse
     )
 
-    @Suppress("EXPERIMENTAL_API_USAGE_FUTURE_ERROR")
+    @OptIn(ExperimentalComposeUiApi::class)
     val pointer = PointerInputEventData(
         id = change.id,
         uptime = change.uptimeMillis,
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt
index 350c695..4060a3c 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt
@@ -261,7 +261,6 @@
         object : LifecycleEventObserver {
             override fun onStateChanged(lifecycleOwner: LifecycleOwner, event: Lifecycle.Event) {
                 val self = this
-                @Suppress("NON_EXHAUSTIVE_WHEN")
                 when (event) {
                     Lifecycle.Event.ON_CREATE ->
                         // Undispatched launch since we've configured this scope
@@ -281,6 +280,15 @@
                     Lifecycle.Event.ON_DESTROY -> {
                         recomposer.cancel()
                     }
+                    Lifecycle.Event.ON_PAUSE -> {
+                        // Nothing
+                    }
+                    Lifecycle.Event.ON_RESUME -> {
+                        // Nothing
+                    }
+                    Lifecycle.Event.ON_ANY -> {
+                        // Nothing
+                    }
                 }
             }
         }
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/autofill/Autofill.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/autofill/Autofill.kt
index 2425f7c..84e8ca6 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/autofill/Autofill.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/autofill/Autofill.kt
@@ -18,6 +18,7 @@
 
 import androidx.compose.ui.ExperimentalComposeUiApi
 import androidx.compose.ui.geometry.Rect
+import androidx.compose.ui.platform.synchronized
 
 /**
  * Autofill API.
@@ -77,7 +78,6 @@
         /*@GuardedBy("this")*/
         private var previousId = 0
 
-        @Suppress("DEPRECATION_ERROR")
         private fun generateId() =
             synchronized(this) { ++previousId }
     }
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/InputModeManager.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/InputModeManager.kt
index 4c1f2aa..19f0acf 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/InputModeManager.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/InputModeManager.kt
@@ -45,7 +45,7 @@
  * This value is used to represent the InputMode that the system is currently in.
  */
 @Suppress("INLINE_CLASS_DEPRECATED")
-inline class InputMode internal constructor (@Suppress("unused") private val value: Int) {
+inline class InputMode internal constructor(@Suppress("unused") private val value: Int) {
     override fun toString() = when (this) {
         Touch -> "Touch"
         Keyboard -> "Keyboard"
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputFilter.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputFilter.kt
index 3edce5f..a99ee2c 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputFilter.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputFilter.kt
@@ -27,6 +27,7 @@
 import androidx.compose.ui.platform.LocalViewConfiguration
 import androidx.compose.ui.platform.ViewConfiguration
 import androidx.compose.ui.platform.debugInspectorInfo
+import androidx.compose.ui.platform.synchronized
 import androidx.compose.ui.unit.Density
 import androidx.compose.ui.unit.IntSize
 import androidx.compose.ui.util.fastAll
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/Synchronization.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/Synchronization.kt
new file mode 100644
index 0000000..90b4cd0
--- /dev/null
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/Synchronization.kt
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.compose.ui.platform
+
+@PublishedApi
+internal expect inline fun <R> synchronized(lock: Any, block: () -> R): R
diff --git a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopPlatformInput.desktop.kt b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopPlatformInput.desktop.kt
index 8a748fb..8b2d35d 100644
--- a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopPlatformInput.desktop.kt
+++ b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopPlatformInput.desktop.kt
@@ -47,7 +47,7 @@
     val density: Density
 }
 
-internal actual class PlatformInput actual constructor (val component: PlatformComponent) :
+internal actual class PlatformInput actual constructor(val component: PlatformComponent) :
     PlatformTextInputService {
     data class CurrentInput(
         var value: TextFieldValue,
diff --git a/compose/ui/ui/src/jvmMain/kotlin/androidx/compose/ui/platform/JvmActuals.jvm.kt b/compose/ui/ui/src/jvmMain/kotlin/androidx/compose/ui/platform/JvmActuals.jvm.kt
index 0395969..82330b0 100644
--- a/compose/ui/ui/src/jvmMain/kotlin/androidx/compose/ui/platform/JvmActuals.jvm.kt
+++ b/compose/ui/ui/src/jvmMain/kotlin/androidx/compose/ui/platform/JvmActuals.jvm.kt
@@ -29,3 +29,7 @@
 }
 
 internal actual fun Any.nativeClass(): Any = this.javaClass
+
+internal actual inline fun <R> synchronized(lock: Any, block: () -> R): R {
+    return kotlin.synchronized(lock, block)
+}
diff --git a/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/SkiaLayer.skiko.kt b/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/SkiaLayer.skiko.kt
index b7bc446..142260a 100644
--- a/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/SkiaLayer.skiko.kt
+++ b/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/SkiaLayer.skiko.kt
@@ -237,6 +237,9 @@
                     is Outline.Rectangle -> canvas.clipRect(outline.rect)
                     is Outline.Rounded -> canvas.clipRoundRect(outline.roundRect)
                     is Outline.Generic -> canvas.clipPath(outline.path)
+                    null -> {
+                        // Nothing
+                    }
                 }
             }
 
diff --git a/datastore/datastore-sampleapp/src/main/java/com/example/datastoresampleapp/SettingsFragment.kt b/datastore/datastore-sampleapp/src/main/java/com/example/datastoresampleapp/SettingsFragment.kt
index 6caa78f..050c649 100644
--- a/datastore/datastore-sampleapp/src/main/java/com/example/datastoresampleapp/SettingsFragment.kt
+++ b/datastore/datastore-sampleapp/src/main/java/com/example/datastoresampleapp/SettingsFragment.kt
@@ -80,7 +80,7 @@
         preferenceScreen = preferences
     }
 
-    @Suppress("EXPERIMENTAL_ANNOTATION_ON_OVERRIDE_WARNING")
+    @Suppress("EXPERIMENTAL_ANNOTATION_ON_OVERRIDE")
     @SuppressLint("SyntheticAccessor")
     @ExperimentalCoroutinesApi
     override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
diff --git a/development/build_log_simplifier/messages.ignore b/development/build_log_simplifier/messages.ignore
index b361a06..ecc237e6 100644
--- a/development/build_log_simplifier/messages.ignore
+++ b/development/build_log_simplifier/messages.ignore
@@ -215,10 +215,11 @@
 \$SUPPORT/compose/runtime/runtime/compose\-runtime\-benchmark/src/androidTest/AndroidManifest\.xml:[0-9]+:[0-9]+\-[0-9]+:[0-9]+ Warning:
 # > Task :compose:ui:ui:compileKotlinMetadata
 w: Runtime JAR files in the classpath should have the same version\. These files were found in the classpath:
-\$CHECKOUT/prebuilts/androidx/external/org/jetbrains/kotlin/kotlin\-reflect/[0-9]+\.[0-9]+\.[0-9]+/kotlin\-reflect\-[0-9]+\.[0-9]+\.[0-9]+\.jar \(version [0-9]+\.[0-9]+\)
-\$CHECKOUT/prebuilts/androidx/external/org/jetbrains/kotlin/kotlin\-stdlib/[0-9]+\.[0-9]+\.[0-9]+-?[A-Z0-9]*/kotlin\-stdlib\-[0-9]+\.[0-9]+\.[0-9]+-?[A-Z0-9]*\.jar \(version [0-9]+\.[0-9]+-?[A-Z0-9]*\)
-\$CHECKOUT/prebuilts/androidx/external/org/jetbrains/kotlin/kotlin\-stdlib\-common/[0-9]+\.[0-9]+\.[0-9]+-?[A-Z0-9]*/kotlin\-stdlib\-common\-[0-9]+\.[0-9]+\.[0-9]+-?[A-Z0-9]*\.jar \(version [0-9]+\.[0-9]+-?[A-Z0-9]*\)
 w: Consider providing an explicit dependency on kotlin\-reflect [0-9]+\.[0-9]+ to prevent strange errors
+\$CHECKOUT/prebuilts/androidx/external/org/jetbrains/kotlin/kotlin\-stdlib/[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*/kotlin\-stdlib\-[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*\.jar \(version [0-9]+\.[0-9]+-?[\-A-Z0-9]*\)
+\$CHECKOUT/prebuilts/androidx/external/org/jetbrains/kotlin/kotlin\-reflect/[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*/kotlin\-reflect\-[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*\.jar \(version [0-9]+\.[0-9]+-?[\-A-Z0-9]*\)
+\$CHECKOUT/prebuilts/androidx/external/org/jetbrains/kotlin/kotlin\-script-runtime/[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*/kotlin\-script-runtime\-[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*\.jar \(version [0-9]+\.[0-9]+-?[\-A-Z0-9]*\)
+\$CHECKOUT/prebuilts/androidx/external/org/jetbrains/kotlin/kotlin\-stdlib\-common/[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*/kotlin\-stdlib\-common\-[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*\.jar \(version [0-9]+\.[0-9]+-?[\-A-Z0-9]*\)
 w: Some runtime JAR files in the classpath have an incompatible version\. Consider removing them from the classpath
 w: \$SUPPORT/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DepthSortedSet\.kt: \([0-9]+, [0-9]+\): The corresponding parameter in the supertype 'Comparator' is named 'a'\. This may cause problems when calling this function with named arguments\.
 w: \$SUPPORT/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DepthSortedSet\.kt: \([0-9]+, [0-9]+\): The corresponding parameter in the supertype 'Comparator' is named 'b'\. This may cause problems when calling this function with named arguments\.
@@ -350,7 +351,7 @@
 WARNING: Illegal reflective access by androidx\.room\.compiler\.processing\.javac\.JavacProcessingEnvMessager\$Companion \(file:\$OUT_DIR/androidx/room/room\-compiler\-processing/build/(classes/kotlin/main/|libs/room\-compiler\-processing\-[0-9]+\.[0-9]+\.[0-9]+(\-(alpha|beta|rc)[0-9]+)?\.jar)\) to field com\.sun\.tools\.javac\.code\.Symbol\.owner
 WARNING: Please consider reporting this to the maintainers of androidx\.room\.compiler\.processing\.javac\.JavacProcessingEnvMessager\$Companion
 # > Task :docs-runner:dokkaJavaTipOfTreeDocs
-\$CHECKOUT/prebuilts/androidx/external/org/jetbrains/kotlin/kotlin\-stdlib\-jdk[0-9]+/[0-9]+\.[0-9]+\.[0-9]+-?[A-Z0-9]*/kotlin\-stdlib\-jdk[0-9]+\-[0-9]+\.[0-9]+\.[0-9]+-?[A-Z0-9]*\.jar \(version [0-9]+\.[0-9]+-?[A-Z0-9]*\)
+\$CHECKOUT/prebuilts/androidx/external/org/jetbrains/kotlin/kotlin\-stdlib\-jdk[0-9]+/[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*/kotlin\-stdlib\-jdk[0-9]+\-[0-9]+\.[0-9]+\.[0-9]+-?[\-A-Z0-9]*\.jar \(version [0-9]+\.[0-9]+-?[\-A-Z0-9]*\)
 # > Task :compose:ui:ui:processDebugAndroidTestManifest
 \$OUT_DIR/androidx/compose/ui/ui/build/intermediates/tmp/manifest/androidTest/debug/tempFile[0-9]+ProcessTestManifest[0-9]+\.xml Warning:
 Package name 'androidx\.compose\.ui\.test' used in: tempFile[0-9]+ProcessTestManifest[0-9]+\.xml, :compose:ui:ui\-test\.
@@ -600,6 +601,7 @@
 Info: Stripped invalid locals information from [0-9]+ methods\.
 Info: Methods with invalid locals information:
 java\.lang\.Object androidx\.glance\.appwidget\.GlanceAppWidget\.compose\$glance_appwidget_release\(android\.content\.Context\, android\.appwidget\.AppWidgetManager\, int\, java\.lang\.Object\, android\.os\.Bundle\, kotlin\.coroutines\.Continuation\)
+java\.lang\.Object androidx\.glance\.state\.GlanceState\.getDataStore\(android\.content\.Context, androidx\.glance\.state\.GlanceStateDefinition, java\.lang\.String, kotlin\.coroutines\.Continuation\)
 java\.lang\.Object androidx\.wear\.complications\.ComplicationDataSourceInfoRetriever\.retrievePreviewComplicationData\(android\.content\.ComponentName, androidx\.wear\.complications\.data\.ComplicationType, kotlin\.coroutines\.Continuation\)
 java\.lang\.Object androidx\.wear\.watchface\.editor\.BaseEditorSession\.openComplicationDataSourceChooser\$suspendImpl\(androidx\.wear\.watchface\.editor\.BaseEditorSession, int, kotlin\.coroutines\.Continuation\)
 java\.lang\.Object androidx\.compose\.ui\.platform\.GlobalSnapshotManager\$ensureStarted\$[0-9]+\.invokeSuspend\(java\.lang\.Object\)
@@ -672,4 +674,4 @@
 C/C\+\+: (debug|release)\|(x86_64|x86|arm64\-v8a|armeabi\-v7a) :Building ver\.\: [0-9]+\.[0-9]+\.[0-9]+
 C/C\+\+: (debug|release)\|(x86_64|x86|arm64\-v8a|armeabi\-v7a) :Packaging for\: (amd\-[0-9]+|armhf\-[0-9]+|x86\-[0-9]+)
 C/C\+\+: (debug|release)\|(x86_64|x86|arm64\-v8a|armeabi\-v7a) :  CMakeLists\.txt:[0-9]+ \(PROJECT\)
-C/C\+\+: (debug|release)\|(x86_64|x86|arm64\-v8a|armeabi\-v7a) :Compiling for ARM
\ No newline at end of file
+C/C\+\+: (debug|release)\|(x86_64|x86|arm64\-v8a|armeabi\-v7a) :Compiling for ARM
diff --git a/glance/glance-appwidget-proto/build.gradle b/glance/glance-appwidget-proto/build.gradle
index 1e4cb4c..1c13b19 100644
--- a/glance/glance-appwidget-proto/build.gradle
+++ b/glance/glance-appwidget-proto/build.gradle
@@ -103,3 +103,12 @@
     runApiTasks = new RunApiTasks.No("No public API required for internal use with app widgets.")
     description = "Protos for use with glance app widgets."
 }
+
+// Kotlin 1.5.31 would provide a different set of attributes on some of the variants, which,
+// possibly due to a coincidence, could sometimes nudge Gradle variant-aware dependency resolution
+// to choosing one of the variants as the best match, while also making it silently choose not the
+// variant that we wanted it to match in other cases.
+// It isn't clear to me if the old (1.5.31) is more correct, or if the new behavior (1.6.0)
+// highlighting a potential ambiguity is more correct.  Presumably the later (so no tracking bug?),
+// but I made Jetbrains aware and I think they might take a look to investigate further.
+configurations.getByName("shadowRuntimeElements").canBeConsumed = false
diff --git a/glance/glance-appwidget/src/androidAndroidTest/kotlin/androidx/glance/appwidget/LazyColumnTest.kt b/glance/glance-appwidget/src/androidAndroidTest/kotlin/androidx/glance/appwidget/LazyColumnTest.kt
index d42b07b..b80d314 100644
--- a/glance/glance-appwidget/src/androidAndroidTest/kotlin/androidx/glance/appwidget/LazyColumnTest.kt
+++ b/glance/glance-appwidget/src/androidAndroidTest/kotlin/androidx/glance/appwidget/LazyColumnTest.kt
@@ -19,11 +19,13 @@
 import android.os.Build
 import android.view.Gravity
 import android.view.View
+import android.view.ViewGroup
 import android.widget.FrameLayout
 import android.widget.ListView
 import android.widget.TextView
 import androidx.compose.ui.unit.Dp
 import androidx.compose.ui.unit.dp
+import androidx.core.view.children
 import androidx.glance.GlanceModifier
 import androidx.glance.appwidget.lazy.LazyColumn
 import androidx.glance.appwidget.lazy.ReservedItemIdRangeEnd
@@ -320,7 +322,8 @@
             }
         }
 
-        mHostRule.onUnboxedHostView(action)
+        // b/206630723: Change in Ie0923d5de57d328b2cdd78219f0049bf38cb9bed to work around KT-49573
+        mHostRule.onUnboxedHostView2(action)
     }
 
     private inline fun <reified T : View> ListView.getUnboxedListItem(position: Int): T {
@@ -333,3 +336,11 @@
         return frame.getChildAt(0).getTargetView()
     }
 }
+
+// b/206630723 Change in Ie0923d5de57d328b2cdd78219f0049bf38cb9bed to work around KT-49573
+inline fun AppWidgetHostRule.onUnboxedHostView2(crossinline block: (ListView) -> Unit) {
+    onHostActivity {
+        val boxingView = assertIs<ViewGroup>(mHostView.getChildAt(0))
+        block(boxingView.children.single().getTargetView())
+    }
+}
diff --git a/glance/glance-wear/build.gradle b/glance/glance-wear/build.gradle
index a729d13..eb1fdf2 100644
--- a/glance/glance-wear/build.gradle
+++ b/glance/glance-wear/build.gradle
@@ -85,6 +85,7 @@
     sourceSets {
         androidTest.assets.srcDirs += project.rootDir.absolutePath + "/../../golden/glance/glance-wear"
     }
+
 }
 
 androidx {
diff --git a/glance/glance/src/androidMain/kotlin/androidx/glance/layout/Alignment.kt b/glance/glance/src/androidMain/kotlin/androidx/glance/layout/Alignment.kt
index beee6c1..a96eea1 100644
--- a/glance/glance/src/androidMain/kotlin/androidx/glance/layout/Alignment.kt
+++ b/glance/glance/src/androidMain/kotlin/androidx/glance/layout/Alignment.kt
@@ -27,7 +27,7 @@
      * smaller than the parent.
      */
     @Suppress("INLINE_CLASS_DEPRECATED")
-    public inline class Horizontal private constructor (private val value: Int) {
+    public inline class Horizontal private constructor(private val value: Int) {
         public companion object {
             public val Start: Horizontal = Horizontal(0)
             public val CenterHorizontally: Horizontal = Horizontal(1)
@@ -40,7 +40,7 @@
      * smaller than the parent.
      */
     @Suppress("INLINE_CLASS_DEPRECATED")
-    public inline class Vertical private constructor (private val value: Int) {
+    public inline class Vertical private constructor(private val value: Int) {
         public companion object {
             public val Top: Vertical = Vertical(0)
             public val CenterVertically: Vertical = Vertical(1)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 6a7333c..eb02229 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -28,11 +28,11 @@
 guavaJre = "29.0-jre"
 hilt = "2.40.1"
 incap = "0.2"
-kotlin = "1.5.31"
+kotlin = "1.6.0"
 kotlinCompileTesting = "1.4.1"
 kotlinCoroutines = "1.5.2"
-ksp = "1.5.31-1.0.0"
-ktlint = "0.42.1"
+ksp = "1.6.0-1.0.1"
+ktlint = "0.43.0"
 leakcanary = "2.7"
 mockito = "2.25.0"
 skiko = "0.5.2"
diff --git a/paging/paging-common/src/main/kotlin/androidx/paging/CachedPageEventFlow.kt b/paging/paging-common/src/main/kotlin/androidx/paging/CachedPageEventFlow.kt
index b2f0d6a..b1f46a4 100644
--- a/paging/paging-common/src/main/kotlin/androidx/paging/CachedPageEventFlow.kt
+++ b/paging/paging-common/src/main/kotlin/androidx/paging/CachedPageEventFlow.kt
@@ -167,6 +167,9 @@
             is PageEvent.Insert<T> -> handleInsert(event)
             is PageEvent.Drop<T> -> handlePageDrop(event)
             is PageEvent.LoadStateUpdate<T> -> handleLoadStateUpdate(event)
+            is PageEvent.StaticList -> {
+                // TODO: Fix exhaustive when b/206683042
+            }
         }
     }
 
diff --git a/paging/paging-common/src/test/kotlin/androidx/paging/LegacyPageFetcherTest.kt b/paging/paging-common/src/test/kotlin/androidx/paging/LegacyPageFetcherTest.kt
index f059a72..0955880 100644
--- a/paging/paging-common/src/test/kotlin/androidx/paging/LegacyPageFetcherTest.kt
+++ b/paging/paging-common/src/test/kotlin/androidx/paging/LegacyPageFetcherTest.kt
@@ -22,6 +22,7 @@
 import androidx.paging.LoadState.NotLoading
 import androidx.paging.LoadType.APPEND
 import androidx.paging.LoadType.PREPEND
+import androidx.paging.LoadType.REFRESH
 import androidx.paging.PagedList.Config
 import androidx.paging.PagingSource.LoadParams.Refresh
 import androidx.paging.PagingSource.LoadResult
@@ -104,10 +105,12 @@
         }
 
         override fun onPageResult(type: LoadType, page: Page<*, String>): Boolean {
-            @Suppress("NON_EXHAUSTIVE_WHEN")
             when (type) {
                 PREPEND -> storage?.prependPage(page)
                 APPEND -> storage?.appendPage(page)
+                REFRESH -> {
+                    // Nothing
+                }
             }
 
             results.add(Result(type, page))
diff --git a/room/room-compiler-processing-testing/src/main/java/androidx/room/compiler/processing/util/compiler/TestKspRegistrar.kt b/room/room-compiler-processing-testing/src/main/java/androidx/room/compiler/processing/util/compiler/TestKspRegistrar.kt
index 53d12aa..233cb41 100644
--- a/room/room-compiler-processing-testing/src/main/java/androidx/room/compiler/processing/util/compiler/TestKspRegistrar.kt
+++ b/room/room-compiler-processing-testing/src/main/java/androidx/room/compiler/processing/util/compiler/TestKspRegistrar.kt
@@ -82,7 +82,8 @@
             )
         }
         val logger = MessageCollectorBasedKSPLogger(
-            messageCollector = messageCollector
+            messageCollector = messageCollector,
+            allWarningsAsErrors = baseOptions.allWarningsAsErrors
         )
         val options = baseOptions.build()
         AnalysisHandlerExtension.registerExtension(
@@ -114,4 +115,4 @@
 
         override fun loadProviders() = loadedProviders
     }
-}
\ No newline at end of file
+}
diff --git a/room/room-compiler-processing-testing/src/test/java/androidx/room/compiler/processing/util/DiagnosticsTest.kt b/room/room-compiler-processing-testing/src/test/java/androidx/room/compiler/processing/util/DiagnosticsTest.kt
index 196b794..a01be29 100644
--- a/room/room-compiler-processing-testing/src/test/java/androidx/room/compiler/processing/util/DiagnosticsTest.kt
+++ b/room/room-compiler-processing-testing/src/test/java/androidx/room/compiler/processing/util/DiagnosticsTest.kt
@@ -87,18 +87,9 @@
                 msg = "warning on field",
                 element = field
             )
-            val expectedLine = if (invocation.isKsp) {
-                3
-            } else {
-                // KAPT fails to report lines properly in certain cases
-                //  (e.g. when searching for field, it uses its parent rather than itself)
-                // Hopefully, once it is fixed, this test will break and we can remove this if/else
-                // https://youtrack.jetbrains.com/issue/KT-47934
-                2
-            }
             invocation.assertCompilationResult {
                 hasWarningContaining("on field")
-                    .onLine(expectedLine)
+                    .onLine(3)
                     .onSource(source)
             }
         }
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspExecutableParameterElement.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspExecutableParameterElement.kt
index b585d2d..9844e7d 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspExecutableParameterElement.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspExecutableParameterElement.kt
@@ -20,7 +20,9 @@
 import androidx.room.compiler.processing.XExecutableParameterElement
 import androidx.room.compiler.processing.XType
 import androidx.room.compiler.processing.ksp.KspAnnotated.UseSiteFilter.Companion.NO_USE_SITE_OR_METHOD_PARAMETER
+import androidx.room.compiler.processing.ksp.synthetic.KspSyntheticPropertyMethodElement
 import com.google.devtools.ksp.symbol.KSFunctionDeclaration
+import com.google.devtools.ksp.symbol.KSPropertySetter
 import com.google.devtools.ksp.symbol.KSValueParameter
 
 internal class KspExecutableParameterElement(
@@ -79,21 +81,24 @@
         fun create(
             env: KspProcessingEnv,
             parameter: KSValueParameter
-        ): KspExecutableParameterElement {
+        ): XExecutableParameterElement {
             val parent = checkNotNull(parameter.parent) {
                 "Expected value parameter '$parameter' to contain a parent node."
             }
-            if (parent !is KSFunctionDeclaration) {
-                error(
+            return when (parent) {
+                is KSFunctionDeclaration -> KspExecutableParameterElement(
+                    env = env,
+                    enclosingMethodElement = KspExecutableElement.create(env, parent),
+                    parameter = parameter
+                )
+                is KSPropertySetter -> KspSyntheticPropertyMethodElement.create(
+                    env, parent
+                ).parameters.single()
+                else -> error(
                     "Don't know how to create a parameter element whose parent is a " +
                         "'${parent::class}'"
                 )
             }
-            return KspExecutableParameterElement(
-                env = env,
-                enclosingMethodElement = KspExecutableElement.create(env, parent),
-                parameter = parameter
-            )
         }
     }
 }
diff --git a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/MethodSpecHelperTest.kt b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/MethodSpecHelperTest.kt
index 43a0b27..5e2919a 100644
--- a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/MethodSpecHelperTest.kt
+++ b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/MethodSpecHelperTest.kt
@@ -458,16 +458,11 @@
         ) { invocation ->
             val (target, methods) = invocation.getOverrideTestTargets(ignoreInheritedMethods)
             methods.forEachIndexed { index, method ->
-                if (invocation.isKsp && method.name == "throwsException" && preCompiledCode) {
-                    // TODO b/171572318
-                    //  https://github.com/google/ksp/issues/507
-                } else {
-                    val subject = MethodSpecHelper.overridingWithFinalParams(
-                        method,
-                        target.type
-                    ).toSignature()
-                    assertThat(subject).isEqualTo(golden[index])
-                }
+                val subject = MethodSpecHelper.overridingWithFinalParams(
+                    method,
+                    target.type
+                ).toSignature()
+                assertThat(subject).isEqualTo(golden[index])
             }
         }
     }
diff --git a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
index 667b630..7a03f87 100644
--- a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
+++ b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
@@ -929,14 +929,9 @@
                 invocation.processingEnv.requireTypeElement("$pkg.JavaSubject").let { subject ->
                     assertWithMessage(subject.qualifiedName).that(
                         collectExceptions(subject)
-                    ).containsExactlyElementsIn(
-                        listOfNotNull(
-                            expectedConstructor.takeIf {
-                                // TODO https://github.com/google/ksp/issues/507
-                                !invocation.isKsp || pkg != "lib"
-                            },
-                            expectedMethod
-                        ),
+                    ).containsExactly(
+                        expectedConstructor,
+                        expectedMethod
                     )
                 }
                 invocation.processingEnv.requireTypeElement("$pkg.KotlinAccessors").let { subject ->
diff --git a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XRoundEnvTest.kt b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XRoundEnvTest.kt
index 14bc4c7..7463ffa 100644
--- a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XRoundEnvTest.kt
+++ b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XRoundEnvTest.kt
@@ -289,26 +289,18 @@
             val annotatedElements =
                 testInvocation.roundEnv.getElementsAnnotatedWith(TopLevelAnnotation::class)
             val annotatedParams = annotatedElements.filterIsInstance<XExecutableParameterElement>()
-            if (!testInvocation.isKsp) {
-                // TODO: https://github.com/google/ksp/issues/636
-                // KSP can't find ctor param annotated elements from property
-                val ctorProperty = annotatedParams.first { it.name == "ctorProperty" }
-                assertThat(ctorProperty.enclosingMethodElement).isEqualTo(
-                    typeElement.findPrimaryConstructor()
-                )
-            }
+            val ctorProperty = annotatedParams.first { it.name == "ctorProperty" }
+            assertThat(ctorProperty.enclosingMethodElement).isEqualTo(
+                typeElement.findPrimaryConstructor()
+            )
             val ctorParam = annotatedParams.first { it.name == "ctorParam" }
             assertThat(ctorParam.enclosingMethodElement).isEqualTo(
                 typeElement.findPrimaryConstructor()
             )
-            if (!testInvocation.isKsp) {
-                // TODO: https://github.com/google/ksp/issues/636
-                // KSP can't find setter param annotated elements
-                val setterParam = annotatedParams.first { it.name == "p0" }
-                assertThat(setterParam.enclosingMethodElement).isEqualTo(
-                    typeElement.getDeclaredMethod("setProperty")
-                )
-            }
+            val setterParam = annotatedParams.first { it.name == "p0" || it.name == "arg0" }
+            assertThat(setterParam.enclosingMethodElement).isEqualTo(
+                typeElement.getDeclaredMethod("setProperty")
+            )
             val methodParam = annotatedParams.first { it.name == "methodParam" }
             assertThat(methodParam.enclosingMethodElement).isEqualTo(
                 typeElement.getDeclaredMethod("method")
diff --git a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspFilerTest.kt b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspFilerTest.kt
index d0e1c07..252acfc 100644
--- a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspFilerTest.kt
+++ b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspFilerTest.kt
@@ -26,6 +26,7 @@
 import com.google.common.truth.Truth.assertThat
 import com.google.devtools.ksp.processing.CodeGenerator
 import com.google.devtools.ksp.processing.Dependencies
+import com.google.devtools.ksp.symbol.KSClassDeclaration
 import com.google.devtools.ksp.symbol.KSFile
 import com.squareup.kotlinpoet.FileSpec
 import com.squareup.kotlinpoet.FunSpec
@@ -134,6 +135,15 @@
             // no-op for the sake of dependency tracking.
         }
 
+        override fun associateWithClasses(
+            classes: List<KSClassDeclaration>,
+            packageName: String,
+            fileName: String,
+            extensionName: String
+        ) {
+            // no-op required override.
+        }
+
         override fun createNewFile(
             dependencies: Dependencies,
             packageName: String,
diff --git a/text/text/src/androidTest/java/androidx/compose/ui/text/android/BoringLayoutFactoryTest.kt b/text/text/src/androidTest/java/androidx/compose/ui/text/android/BoringLayoutFactoryTest.kt
index 1ee9f8a..e4a4227 100644
--- a/text/text/src/androidTest/java/androidx/compose/ui/text/android/BoringLayoutFactoryTest.kt
+++ b/text/text/src/androidTest/java/androidx/compose/ui/text/android/BoringLayoutFactoryTest.kt
@@ -83,7 +83,7 @@
 
         assertThat(boringLayout.text).isEqualTo(text)
         assertThat(boringLayout.paint).isEqualTo(paint)
-        // The width and height of the boringLayout is the same in metrics, indicating metrics is 
+        // The width and height of the boringLayout is the same in metrics, indicating metrics is
         // passed correctly.
         assertThat(boringLayout.getLineWidth(0).toInt()).isEqualTo(metrics.width)
         assertThat(boringLayout.getLineBottom(0) - boringLayout.getLineTop(0))
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/OffscreenPageLimitTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/OffscreenPageLimitTest.kt
index 5d7de7b..8d89a7d 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/OffscreenPageLimitTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/OffscreenPageLimitTest.kt
@@ -137,6 +137,12 @@
                         )
                     }
                 }
+                is OnPageSelectedEvent -> {
+                    // Nothing
+                }
+                is OnPageScrollStateChangedEvent -> {
+                    // Nothing
+                }
             }
         }
         // Verify that laid out pages don't change after the last scroll event
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageChangeCallbackTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageChangeCallbackTest.kt
index 4ecaaf5..be88373 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageChangeCallbackTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/PageChangeCallbackTest.kt
@@ -1222,6 +1222,12 @@
                     )
                     prevScrollPosition = currScrollPosition
                 }
+                is MarkerEvent -> {
+                    // Nothing
+                }
+                is OnPageScrollStateChangedEvent -> {
+                    // Nothing
+                }
             }
         }
     }
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SetItemWhileScrollInProgressTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SetItemWhileScrollInProgressTest.kt
index dfa3e30..b489cb4 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SetItemWhileScrollInProgressTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SetItemWhileScrollInProgressTest.kt
@@ -263,6 +263,9 @@
                     )
                     prevPosition = currentPosition
                 }
+                is OnPageScrollStateChangedEvent -> {
+                    // Nothing
+                }
             }
         }
     }
diff --git a/wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/Typography.kt b/wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/Typography.kt
index e7fc5bc..dced37b 100644
--- a/wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/Typography.kt
+++ b/wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/Typography.kt
@@ -68,7 +68,7 @@
  * imagery or to introduce a headline.
  */
 @Immutable
-public class Typography internal constructor (
+public class Typography internal constructor(
     public val display1: TextStyle,
     public val display2: TextStyle,
     public val display3: TextStyle,
diff --git a/wear/tiles/tiles-renderer/build.gradle b/wear/tiles/tiles-renderer/build.gradle
index 0289289..5337b94 100644
--- a/wear/tiles/tiles-renderer/build.gradle
+++ b/wear/tiles/tiles-renderer/build.gradle
@@ -117,3 +117,4 @@
     description = "Android Wear Tiles Renderer components. These components can be used to parse " +
             "and render an already constructed Wear Tile."
 }
+
diff --git a/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/CurrentUserStyleRepository.kt b/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/CurrentUserStyleRepository.kt
index 2dbd5c1..a4184b4 100644
--- a/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/CurrentUserStyleRepository.kt
+++ b/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/CurrentUserStyleRepository.kt
@@ -437,6 +437,9 @@
 
                 is UserStyleSetting.CustomValueUserStyleSetting ->
                     customValueUserStyleSettingCount++
+                else -> {
+                    // Nothing
+                }
             }
         }
 
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationSlot.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationSlot.kt
index 02fa327..8e16e8c 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationSlot.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationSlot.kt
@@ -677,6 +677,14 @@
                     )
                 }
             }
+
+            is HighlightedElement.UserStyle -> {
+                // Nothing
+            }
+
+            null -> {
+                // Nothing
+            }
         }
     }