jmfayard
05/12/2017, 5:42 AMzeljko
05/12/2017, 9:44 AMclasses
and kotlin-classes
in the output directory (In my case, gradle -> build). If it "forgots" to update one of the directories, other module will see old version of the file. Compiling from gradle works as it should, Temporary solution is to delete the build directory, but it is hard to say will problem happen again or not.zeljko
05/12/2017, 9:58 AMCzar
05/16/2017, 3:30 PMpavel.talanov
05/16/2017, 3:36 PMCzar
05/16/2017, 3:37 PMnatpryce
05/17/2017, 8:55 AMwhen (fruit) {
is Apple -> printApple(fruit)
is Banana -> printBanana(fruit)
}
But if you add a non-null assertion at the end, it will be treated as an expression, and then the compiler will check for exhaustiveness, so the code below will not compile, as one would wish.
when (fruit) {
is Apple -> printApple(fruit)
is Banana -> printBanana(fruit)
}!!
But IntelliJ marks the !! with an unused code warning.natpryce
05/17/2017, 8:59 AMspand
05/17/2017, 9:05 AM.apply{}
instead or something similar ?christophsturm
05/17/2017, 10:35 AMinline fun Any.check() {}
and call that instead of !!dersoz
05/17/2017, 5:34 PMyole
05/17/2017, 5:35 PMyole
05/17/2017, 5:35 PMmikehearn
05/17/2017, 10:37 PMnatpryce
05/18/2017, 12:19 AMchristophsturm
05/18/2017, 8:36 AMmiha-x64
05/18/2017, 8:40 AM// Java
public class Something {
public String getValue() {...}
}
// Kotlin
class SomethingCool {
@Deprecated(..., ReplaceWith(...))
override fun getValue(): String = ...
}
Getting this issue:
SomethingCool().getValue() // got quickfix from ReplaceWith
SomethingCool().value // no quickfix
Is it known issue or should I file a new one? Or I’m doing something wrong?yole
05/18/2017, 8:41 AMnatpryce
05/18/2017, 10:16 AMexhaustive
). My request is for this use case of !! not to flag a warning, so that we don't have to have a function that duplicates something in the language.christophsturm
05/18/2017, 10:24 AMkirillrakhman
05/18/2017, 10:59 AMUnit
returning functions?
fun foo() <hint>: Unit</hint> = bar()
kirillrakhman
05/18/2017, 10:59 AMyole
05/18/2017, 11:05 AMUnit
kirillrakhman
05/18/2017, 11:22 AMkirillrakhman
05/18/2017, 11:22 AMkirillrakhman
05/18/2017, 11:23 AMjchildress
05/18/2017, 1:29 PMSudhir Singh Khanger
05/18/2017, 2:26 PMcodeslubber
05/18/2017, 2:31 PMcodeslubber
05/18/2017, 2:31 PM