https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
announcements
  • m

    muralimohan962

    08/05/2018, 5:34 AM
    When i try to access the getInstance method it throws NoSuchFieldError. Why is it so?
    e
    k
    +2
    • 5
    • 9
  • k

    Kulwinder Singh

    08/05/2018, 8:34 AM
    Here i am
    deleting
    and
    saving
    data using kotlin
    corutine
    inside
    onDestroy
    method of
    Service
    , i want to know that What happen if
    Service
    destroyed before save operation is completed
    What_happen_if__Service__destroyed_before_save_operation_is_completed.kt
    k
    • 2
    • 7
  • p

    prashanth.hegde

    08/05/2018, 1:22 PM
    Here. First, I just want to say that I love kotlin. It has made my and my team's life easy on so many occasions. I use kotlin in production, on server side. I have never had any issues with Kotlin! I love it! So, I have a library written in kotlin, that is wrapping around apache httpclient. It uses coroutines and provides convenience and auth functions around our stack. I use kotlin
    1.2.41
    in the library. Strangely, when I upgrade the library to
    1.2.50
    and above, the dependent projects (spring boot) cannot see my library. gradle command line builds fine. Only IntelliJ does not recognize the library functions. Am I missing something?? The only change being upgrading the kotlin versions from
    1.2.41
    to
    1.2.60
    AND upgrade coroutines from
    0.22.5
    to
    0.24.0
    a
    • 2
    • 4
  • b

    brabo-hi

    08/06/2018, 1:54 AM
    What_is_wrong_with_the_return_Pair___i_got_that_error___error__type_mismatch__inferred_type_is_Array_Int__but_IntArray_was_expected.js
    g
    • 2
    • 3
  • s

    supaham

    08/06/2018, 3:33 PM
    Is it possible to destruct a list into variables e.g.
    val item1, item2, item3 = list
    If so, is it possible to make it do a getOrNull?
    a
    k
    • 3
    • 13
  • k

    karelpeeters

    08/06/2018, 6:36 PM
    Collections.syncronizedList(...)
    s
    d
    • 3
    • 3
  • b

    Boyong

    08/06/2018, 7:26 PM
    I need some help with TornadoFX https://stackoverflow.com/questions/51714228/how-to-update-autocomplete-combobox-suggestion-list-with-info-from-the-database
    d
    • 2
    • 2
  • a

    Alowaniak

    08/06/2018, 9:57 PM
    How could I implement an "async" (for Deferred<Boolean>) or/and?
    k
    • 2
    • 1
  • g

    groostav

    08/07/2018, 6:56 AM
    blegh, does kotlin provide a nice way to get the platform I'm running on? I know that javascript and native make that question more complicated, but I'm annoyed by
    getProperty("os.name")
    , does kotlin have something better?
    l
    • 2
    • 1
  • r

    Richard

    08/07/2018, 1:26 PM
    Hello guys. Not really sure where to post this, but i feel like non-override
    val person: Entity? = null
    should throw a warning in IntelliJ. Or do you find any case where it's OK?
    c
    e
    • 3
    • 3
  • r

    rrader

    08/07/2018, 1:35 PM
    fun check(params: Map>String, *>, ???): ???
    check(params, String) // return a String
    check(params, String?) // return a String?
    what to put instead of
    ???
    ?
    d
    • 2
    • 2
  • r

    rrader

    08/07/2018, 1:53 PM
    the result is the same String.Companion
    Type mismatch: inferred type is String.Companion but String was expected
    d
    p
    • 3
    • 12
  • l

    leandro

    08/07/2018, 3:26 PM
    Is anyone using kotlinx.html ? I’m looking for some intermediate/advanced tips and source of inspiration. I’m currently writing a landing page
    h
    w
    • 3
    • 3
  • s

    shusek

    08/07/2018, 3:48 PM
    Does anyone know how can I use kotlin native list/array in C++?
    a
    • 2
    • 2
  • f

    francis

    08/07/2018, 11:49 PM
    i get such an error when i try to run my app,any suggestions please
    g
    • 2
    • 3
  • r

    redrield

    08/08/2018, 12:45 AM
    Is there a way that I can verify if a suspend lambda was called in a test?
    g
    • 2
    • 1
  • a

    anstaendig

    08/08/2018, 10:15 AM
    Is it possible to have non-null property with a custom getter without initialising it?
    l
    • 2
    • 2
  • a

    anstaendig

    08/08/2018, 10:16 AM
    -.kt
    g
    p
    • 3
    • 3
  • s

    shusek

    08/08/2018, 11:13 AM
    For curiosity, why extension of array return list? It does not make sense to me. intArrayOf(1,2,3).filter { it > 1} = List<Int>
    l
    • 2
    • 2
  • j

    jw

    08/08/2018, 1:02 PM
    filterIndexed
    e
    s
    • 3
    • 4
  • s

    sendilkumarn [JHipster]

    08/08/2018, 7:18 PM
    Can someone help me to unblock me in discussions.kotlin.org ? It says account is suspended I dont know why?
    r
    i
    • 3
    • 5
  • s

    ske

    08/08/2018, 11:39 PM
    Is there a neat way of accessing a private/internal field from an inline function in a class? I'd rather not make the field public as it's internal state that shouldn't be poked from the outside.
    i
    • 2
    • 2
  • l

    Lucas Ł

    08/09/2018, 9:08 AM
    by testing a public/global one that uses it
    p
    a
    • 3
    • 2
  • d

    dalexander

    08/09/2018, 11:56 AM
    The simplest guideline is to not inline anything unless it’s something the compiler needs or the IDE suggests. ie. if you are using generic reification you will need to inline that method. The JVM JIT is pretty good about figuring out what to inline, and unless you are very careful inline methods are more likely to hurt performance than help.
    👍🏻 4
    k
    e
    • 3
    • 4
  • k

    Krs

    08/09/2018, 12:13 PM
    Oracle going full Kotlin O_o

    https://youtu.be/A-mxj2vhVAA?t=756▾

    👍 3
    📢 1
    p
    m
    +5
    • 8
    • 13
  • k

    kunalsheth

    08/09/2018, 2:31 PM
    I’m not experience with compiler/type-checker implementations, but I’ld be interested in learning about what is going on.
    • 1
    • 2
  • m

    Mohamed Ebrahim

    08/09/2018, 6:08 PM
    why all developers don't contribute in saturday and sunday ? is this Kind of Weekend ?
    r
    h
    • 3
    • 3
  • a

    adam-mcneilly

    08/09/2018, 6:17 PM
    If I have an extension function that takes in
    (T) -> Unit
    as a function type, how can I call this from Java? Does anyone have a code sample of this?
    s
    r
    • 3
    • 19
  • k

    karelpeeters

    08/09/2018, 8:12 PM
    One applies to classes, the other to types 😛
    val a: @Foo Int = 5
    t
    • 2
    • 1
  • g

    groostav

    08/09/2018, 11:14 PM
    anybody got an idea what im doing wrong?
    s
    • 2
    • 4
Powered by Linen
Title
g

groostav

08/09/2018, 11:14 PM
anybody got an idea what im doing wrong?
s

Shawn

08/09/2018, 11:15 PM
have you updated your kotlin plugin recently?
g

groostav

08/09/2018, 11:15 PM
yeah the plugins at 1.2.60, i did that as part of this
hold on, an entry for 1.2 got added to the drop-down, seemingly without me doing anything
yeah, im able to select kotlin 1.2 and ubild now, the issue mysteriously went away...
View count: 2