Stanislav Myachenkov
11/10/2020, 8:51 PMelect
11/11/2020, 7:27 PM.idea
: codeStyles/codeStyleConfig.xml
, encodings.xml
, misc.xml
and vcs.xml
?jasper
11/16/2020, 10:41 PMcollection.filter(it => it.age > 18)
^-- Was told that calling the parameter 'it' is 'weird' and that I must not do this! 😄louiscad
11/19/2020, 7:30 PMelect
11/19/2020, 10:00 PMAnaniya
11/23/2020, 12:30 PMoperator fun String.times(i: Int){
var string: String? = null
repeat(i){
string = this
}
return string
}
fun main(){
print("hello"*8)
}
It suppose to print 8x but it returns null from the fun or print only 1 hellomanlan
11/24/2020, 5:10 PMnanodeath
11/28/2020, 5:12 PMRuckus
12/01/2020, 6:51 PMitnoles
12/01/2020, 11:14 PMHankG
12/02/2020, 7:23 PMSlackbot
12/03/2020, 1:20 PMelect
12/04/2020, 9:17 AMColton Idle
12/07/2020, 12:50 AMjmfayard
12/07/2020, 2:24 PMbjonnh
12/08/2020, 4:42 PMStacy
12/11/2020, 10:09 PMMarc Knaup
12/14/2020, 5:18 PMthanksforallthefish
12/16/2020, 6:57 AMdata class Entity
that I would like to refactor. in this class there are a lots of method like
fun promote() : Entity {
require(state == States.Initial) { "Cannot promote entity in state $state" }
return copy(state = States.Promoted)
}
fun demote() : Entity = ... same pattern
I would like to turn this into a type system of sort
sealed class Entity
data class Initial : Entity { fun promote() = Promoted(...) }
data class Promoted : Entity { fun demote() = ... }
however there are like a lot and a lot and a lot of usages of current Entity
data class features, especially copy method and equals. how would intellij help me with this refactor? I feel like this is one of those more complex refactor some ide magicians can do in a matter of half a day but would take me forever. I am not worried of taking a long time, since even if there is some magic refactor technique I would not be expert with it and would need to learn it, but I would like to learn it so next time it will be faster.kartikpatodi
12/16/2020, 10:29 AMMarc Knaup
12/17/2020, 5:24 PMjasper
12/17/2020, 9:51 PMnanodeath
12/22/2020, 1:22 AMIllegalArgumentException
always auto-completing to java.lang.IllegalArgumentException
instead of the Kotlin stdlib typealias? same goes for all the common exceptions, like RuntimeException
Jitesh
01/12/2021, 12:56 PMHarrison Wong
01/14/2021, 3:02 PMstephanmg
01/14/2021, 3:16 PMelect
01/20/2021, 12:25 PM--edge
options to get the EAP versionstephanmg
01/21/2021, 3:12 PMstephanmg
01/22/2021, 8:55 AMPurav Datta
01/26/2021, 2:25 AM