domfox
01/18/2019, 2:55 PMval Class<*>.desc: String
get() {
if (this == Void.TYPE) return "V"
// This is a clever exploitation of a format returned by Class.getName(): for arrays, it's almost an internal name,
// but with '.' instead of '/'
return createArrayType().name.substring(1).replace('.', '/')
}
fun Class<*>.createArrayType(): Class<*> =
Array.newInstance(this, 0)::class.java
uhe
01/18/2019, 2:56 PMname
can be nullSaiedmomen
01/18/2019, 6:05 PMopen
classes and members
2. use mockito inline
3. extract interfaces and abstract classes
Mockk can also handle this nicely but it has issues with running Android Instrumentation tests on none android Pie devicesEric O'Connell
01/18/2019, 6:57 PMdoIfNull
is clearer)?
fun <T> T?.orElse(ifNull: () -> Unit): T? {
if (this == null) {
ifNull()
}
return this
}
Eric O'Connell
01/18/2019, 6:57 PMnull
case when using <expr>?.let { }
and friendsChills
03/20/2020, 8:06 AMChills
03/20/2020, 8:07 AMjaguililla
03/20/2020, 8:46 AMelect
03/20/2020, 11:16 AMobject vk {
fun Memory.enumerate()
fun enumerate() = getMemory.enumerate()
}
fun Memory.create() {
val layer = vk.enumerate()
}
I'd expect vk.enumerate()
to call the corresponding vk
member extension function.. but this is not what happens.. why? How may I solve?Chills
03/20/2020, 11:59 AMChills
03/21/2020, 7:51 AMEdoardo Luppi
03/21/2020, 9:37 AMEdoardo Luppi
03/21/2020, 2:08 PMAnnotator
.
https://github.com/lppedd/idea-kotlin-additional-highlighting
Now pending on Plugin Repository https://plugins.jetbrains.com/plugin/13979-kotlin-additional-highlightingJanelle Fullen
03/22/2020, 1:35 AMincludeBuild("../mediapresentation")
However, when I run the player:build task in IntelliJ's gradle menu, it fails when trying to include the mediaplayer dependency:Janelle Fullen
03/22/2020, 1:35 AMBuild file '/Users/janelle.fullen/IdeaProjects/oneplayer/mediapresentation/build.gradle.kts' line: 2
Plugin [id: 'org.jetbrains.kotlin.multiplatform'] was not found in any of the following sources:
Janelle Fullen
03/22/2020, 1:36 AMJanelle Fullen
03/22/2020, 1:36 AMJanelle Fullen
03/22/2020, 1:36 AM> Could not resolve all artifacts for configuration ':player:releaseCompileClasspath'.
> Could not find :mediapresentation:.
Required by:
project :player
user
03/23/2020, 1:23 PMuser
03/23/2020, 3:50 PMmaxieayala
03/23/2020, 3:51 PMRay Ryan
03/23/2020, 8:45 PMwaltermcq
03/23/2020, 11:49 PMSteve
03/23/2020, 11:55 PMGilberto Diaz
03/24/2020, 1:15 AMbasher
03/24/2020, 1:27 AMlouiscad
03/24/2020, 8:48 AMGopal S Akshintala
03/25/2020, 3:24 PMhooliooo
03/25/2020, 3:35 PM