Eugenio
06/26/2017, 8:21 AM...
Cause: No var type @142
Element is unknownThe root cause was thrown at: RedundantNullCheckV2MethodTransformer.kt:208
at org.jetbrains.kotlin.codegen.TransformationMethodVisitor.visitEnd(TransformationMethodVisitor.java:86)
at org.jetbrains.kotlin.codegen.TransformationMethodVisitor.visitEnd(TransformationMethodVisitor.java:83)
... 63 more
Caused by: java.lang.AssertionError: No var type @142
at org.jetbrains.kotlin.codegen.optimization.nullCheck.RedundantNullCheckV2MethodTransformer$TransformerPass$NullabilityAssumptionsBuilder.injectAssumptions(RedundantNullCheckV2MethodTransformer.kt:208)
at org.jetbrains.kotlin.codegen.optimization.nullCheck.RedundantNullCheckV2MethodTransformer$TransformerPass$NullabilityAssumptionsBuilder.injectNullabilityAssumptions(RedundantNullCheckV2MethodTransformer.kt:170)
at org.jetbrains.kotlin.codegen.optimization.nullCheck.RedundantNullCheckV2MethodTransformer$TransformerPass.injectNullabilityAssumptions(RedundantNullCheckV2MethodTransformer.kt:88)
at org.jetbrains.kotlin.codegen.optimization.nullCheck.RedundantNullCheckV2MethodTransformer$TransformerPass.eliminateRedundantChecks(RedundantNullCheckV2MethodTransformer.kt:78)
at org.jetbrains.kotlin.codegen.optimization.nullCheck.RedundantNullCheckV2MethodTransformer$TransformerPass.run(RedundantNullCheckV2MethodTransformer.kt:48)
at org.jetbrains.kotlin.codegen.optimization.nullCheck.RedundantNullCheckV2MethodTransformer.transform(RedundantNullCheckV2MethodTransformer.kt:37)
at org.jetbrains.kotlin.codegen.optimization.OptimizationMethodVisitor.performTransformations(OptimizationMethodVisitor.java:67)
at org.jetbrains.kotlin.codegen.TransformationMethodVisitor.visitEnd(TransformationMethodVisitor.java:63)
... 64 more
:compileInternalKotlin FAILED
known issue?kirillrakhman
07/13/2017, 10:00 AMmap
and joinToString
which looks harmless but actually the lambda in map
is inline while in joinToString
it's not. Is this an issue? I understand that the extra lambda allocation is probably compensated by the saved List
allocation but the code size and method count grows a little.miha-x64
07/20/2017, 3:38 PMjava.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.collections.CollectionsKt__IterablesKt.collectionSizeOrDefault, parameter $receiver
at kotlin.collections.CollectionsKt__IterablesKt.collectionSizeOrDefault(Iterables.kt)
at my.code.SomeClass.method(deserializers.kt:439)
...
click on deserializers.kt:439
-> Inline function call site
shows me deserializert.kt:107
, which is someMap.map { (_, value) ->
.
Click on Inline function body
passes me to Iterable.map
function source (which really contains a call to collectionSizeOrDefault
), but both Cmd+click on .map {
and bytecode show me that Map.map
function should be / was actually inlined, and it does not contain any calls to collectionSizeOrDefault
. 🙀mikhailov
08/09/2017, 3:21 PMjlleitschuh
08/09/2017, 6:18 PMkirillrakhman
08/15/2017, 8:00 AM@Parcelize
feature during the EAP phase and wasn't able to test it properly before release. Did I just miss it or wasn't it communicated?sdeleuze
08/15/2017, 8:11 AMSorin
08/17/2017, 12:44 PM@Parcelize
but I constantly get a compiler error: error: cannot find symbol CREATOR = null
, when I remove kapt it seems to work. But I need both in my project.kirillrakhman
08/23/2017, 3:10 PMnhaarman
09/07/2017, 7:10 AMsdeleuze
09/23/2017, 12:09 PM1.1.50
null-safety support, see https://youtrack.jetbrains.com/issue/KT-19419#comment=27-2435983pniederw
10/29/2017, 7:23 AMralf
11/06/2017, 1:22 PMw: [kapt] Sources output directory is not specified for database_debug, skipping annotation processing
The project builds fine, though. It’s a problem for us, because we’d like to make Kotlin compiler warnings errors with 1.2.elect
11/27/2017, 7:18 AMrc-84
instead
Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.0-rc-84.
Searched in the following locations:
<https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.0-rc-84/kotlin-gradle-plugin-1.2.0-rc-84.pom>
<https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.0-rc-84/kotlin-gradle-plugin-1.2.0-rc-84.jar>
<https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.0-rc-84/kotlin-gradle-plugin-1.2.0-rc-84.pom>
<https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.0-rc-84/kotlin-gradle-plugin-1.2.0-rc-84.jar>
<https://dl.bintray.com/kotlin/kotlin-dev/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.0-rc-84/kotlin-gradle-plugin-1.2.0-rc-84.pom>
<https://dl.bintray.com/kotlin/kotlin-dev/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.0-rc-84/kotlin-gradle-plugin-1.2.0-rc-84.jar>
<https://oss.sonatype.org/content/repositories/snapshots/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.0-rc-84/kotlin-gradle-plugin-1.2.0-rc-84.pom>
<https://oss.sonatype.org/content/repositories/snapshots/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.0-rc-84/kotlin-gradle-plugin-1.2.0-rc-84.jar>
Required by:
project :
oshai
12/15/2017, 6:47 AMbeholder
12/20/2017, 7:29 PMdenis.zharkov
12/21/2017, 7:29 AMkotlin.incremental.usePreciseJavaTracking=true
to your gradle.properties
dsavvinov
02/15/2018, 11:00 AM1.2.30-eap-47
is available! https://discuss.kotlinlang.org/t/kotlin-1-2-30-eap/6479 📣pniederw
02/19/2018, 7:52 PMskennedy
04/13/2018, 11:30 PMExecution failed for task ':app:transformResourcesWithMergeJavaResForDebugAndroidTest'.
> More than one file was found with OS independent path 'META-INF/main.kotlin_module'
It’s working fine with 1.2.31 though, and I’m not really sure how to get enough useful information for a bug reportsdeleuze
04/25/2018, 9:11 AMilya.chernikov
05/16/2018, 5:33 PMkrtko
05/31/2018, 5:21 PMchristophsturm
06/01/2018, 3:18 PMSlackbot
06/08/2018, 8:08 AMudalov
07/31/2018, 9:58 AM1.2.60-eap-75
).
This build mostly contains last-minute fixes of problems found in the latest build and is very close to the release, so please check that new versions of plugins and libraries are working correctly in your project. Thanks!
What's new: https://github.com/JetBrains/kotlin/releases/tag/v1.2.60-eap-75orangy
08/15/2018, 4:27 PMrobin
08/29/2018, 8:48 PM@ExperimentalContracts
Annotation, so I have to effectively mark all my functions with that Annotation. Is that intended? From the blog it seems like you should only need that annotation on functions that actually specify a contract, not those that just call functions with contracts.robin
08/29/2018, 8:54 PM-XXLanguage:+InlineClasses
option. How do I do that if I build via gradle? Is there an equivalent to kotlin.experimental.coroutines "enable"?Jeff Gulbronson
08/31/2018, 4:47 PM@ExperimentalContracts
fun String?.trueIfNotNullOrEmpty(): Boolean {
contract {
returns(true) implies (this@trueIfNotNullOrEmpty != null)
}
return !isNullOrEmpty()
}
@ExperimentalContracts
fun foo() {
val maybeNull : String? = "foo"
val isNotNull = maybeNull.trueIfNotNullOrEmpty()
if (isNotNull) {
val definitelyNotNull : String = maybeNull
}
}
Intellij is saying I can’t assign maybeNull
to definitelyNotNull
, because it’s String
vs String?
. My contract seems right, it’s really just the inverse of what isNullOrEmpty
uses. Any idea where I went wrong? Sorry in advance if it’s blindingly obvious.Jeff Gulbronson
08/31/2018, 4:47 PM@ExperimentalContracts
fun String?.trueIfNotNullOrEmpty(): Boolean {
contract {
returns(true) implies (this@trueIfNotNullOrEmpty != null)
}
return !isNullOrEmpty()
}
@ExperimentalContracts
fun foo() {
val maybeNull : String? = "foo"
val isNotNull = maybeNull.trueIfNotNullOrEmpty()
if (isNotNull) {
val definitelyNotNull : String = maybeNull
}
}
Intellij is saying I can’t assign maybeNull
to definitelyNotNull
, because it’s String
vs String?
. My contract seems right, it’s really just the inverse of what isNullOrEmpty
uses. Any idea where I went wrong? Sorry in advance if it’s blindingly obvious.dsavvinov
08/31/2018, 4:54 PMmaybeNull.trueIfNotNullOrEmpty()
into plain maybeNull != null
, and you still won't get smartcast.
Here's an issue for that: https://youtrack.jetbrains.com/issue/KT-25747Jeff Gulbronson
08/31/2018, 5:01 PMmaybeNull != null
wouldn’t work.
Interestingly I changed the contract to
contract {
returns(true) implies (this@trueIfNotNullOrEmpty is String)
}
And still no good, though I would’ve expected this one to work. I suppose contracts are new so I’m not 100% sure what should work and what shouldn’t.dsavvinov
08/31/2018, 5:34 PMisNull
. Compiler has to check that this boolean is initialized to something special, and keep in mind that if isNull == true
then maybeNull != null
(or maybeNull is String
, actual kind of smartcast is irrelevant). We don't do that at the moment
(sorry if I got you wrong -- if you've inlined isNull
variable and still don't get smartcast, then the issue is somewhere else. If you'll show complete code, we can continue digging here :) )Jeff Gulbronson
08/31/2018, 8:01 PMval