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
intellij
  • d

    diego-gomez-olvera

    08/17/2017, 8:05 AM
    I usually use '⌘ + P' to see the type of the parameters. It works when I use it in a lambda that is inside the parameters list, but not when it is the last lambda out of the parameter. Is there another shortcut to see it?
    o
    • 2
    • 2
  • y

    yole

    08/17/2017, 10:11 AM
    this is not a bug, this is an unsupported feature
    d
    • 2
    • 2
  • k

    karelpeeters

    08/17/2017, 2:15 PM
    I don't know how feasible this is, but can you start with an empty project and go step by step to the actual project and see where it goes wrong?
    k
    j
    • 3
    • 28
  • y

    yole

    08/18/2017, 9:00 AM
    there's now a build which fixes the problem with incorrect library import from Gradle projects: https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_114_CompilerAndPlugin_NoTests/1145184:id/kotlin-plugin-1.1.4-release-IJ2017.2-2.zip
    k
    • 2
    • 14
  • d

    dreamreal

    08/18/2017, 12:37 PM
    I just got it again:
    Unresolved service: class org.jetbrains.kotlin.resolve.jvm.JavaDescriptorResolver
    y
    y
    • 3
    • 30
  • a

    adeln

    08/18/2017, 12:51 PM
    @mglukhikh though it would be really great if intention was still in place (a lot of muscle memory depends on that)
    🆗 1
    k
    • 2
    • 7
  • y

    yole

    08/18/2017, 4:19 PM
    Kotlin 1.1.4-2 has now been released to the stable channel
    🎉 1
    👏 4
    k
    k
    • 3
    • 7
  • k

    karelpeeters

    08/18/2017, 9:06 PM
    Try a clean build, clearing Idea's caches (File > Invalidate caches) and reimporting the project.
    a
    • 2
    • 2
  • g

    gaetan

    08/18/2017, 10:12 PM
    Is there any plan to provide DSM Analysis for kotlin? As kotlin projects are getting bigger it could be interesting.
    k
    y
    • 3
    • 6
  • l

    louiscad

    08/21/2017, 9:38 AM
    Hi JetBrains, why this inconsistency (by default on some projects) between the gradle config and the IDE settings? See the following StackOverflow answer and it's comments: https://stackoverflow.com/a/45362672/4433326
    y
    • 2
    • 2
  • d

    diesieben07

    08/21/2017, 11:33 AM
    I am using the allopen compiler plugin, but it is only applied when building using gradle. If I use the normal IntelliJ launch configurations, classes are still final. How do I tell IntelliJ about the plugin?
    y
    • 2
    • 2
  • m

    martynas

    08/22/2017, 6:06 AM
    message has been deleted
    l
    • 2
    • 3
  • d

    dave08

    08/22/2017, 12:06 PM
    Anyone might have an idea why intellij ultimate keeps on telling me that Kotlin is not configured when using new gradle plugin dsl? (I'm working with the vertx framework). I have to use apply plugin for it to start working?
    y
    n
    • 3
    • 18
  • n

    nitrog42

    08/23/2017, 8:23 AM
    wrong channel, you want #android + make a bug report on https://issuetracker.google.com/issues?q=componentid:192709%2B
    👍 2
    y
    • 2
    • 2
  • c

    chetankokil

    08/24/2017, 2:45 AM
    May be this question have been asked earlier but I am trying to use @repository in spring boot and the cassandratemplate is always null even though autowired through constructor
    y
    • 2
    • 1
  • d

    dumptruckman

    08/24/2017, 7:27 PM
    Why hasn't there been any post about 1.1.4-2?
    y
    • 2
    • 3
  • c

    christophsturm

    08/25/2017, 12:24 PM
    anyway thats probably not kotlin related. but i do think the default should be to keep annotations on the same line
    y
    • 2
    • 1
  • j

    janvladimirmostert

    08/26/2017, 12:04 PM
    It's either K or pressing down - would be nice to be able to edit that menu, most of those options I don't make use of 99.99% of the time
    y
    • 2
    • 2
  • h

    horse_badorties

    08/26/2017, 12:32 PM
    class Node(val nodes: List<Node>)
    
    fun preOrder(node: Node) = node.nodes.forEach {
        // ...
        preOrder(it)
    }
    does not compile using kotlin version 1.1.4-2 due to
    Type checking has run into a recursive problem. Easiest workaround: specify types of your declarations explicitly
    It compiles using
    fun preOrder(node: Node): Unit = ...
    but then there is a
    Redundant 'Unit' return type
    warning?!
    y
    • 2
    • 4
  • c

    chris-horner

    08/28/2017, 2:16 AM
    So I just discovered Kotlin's precondition functions and they're pretty neat. However one thing they don't do is play nicely with smart casts. Take for example:
    fun onAttach(view: View) {
      require(view is HomeView)
      // No smart cast from View to HomeView.
    }
    Is this something that should be supported? If so and a PR is welcome, where abouts in the source should I be looking for smart cast stuff?
    k
    s
    • 3
    • 4
  • c

    christophsturm

    08/28/2017, 12:04 PM
    for me its a huge blocker, it means basically no code assist at all in any file that calls a scala method
    o
    • 2
    • 1
  • y

    yole

    08/30/2017, 2:10 PM
    please do file an issue
    h
    • 2
    • 1
  • t

    tlaukkan

    09/04/2017, 7:16 AM
    Hi, when I have sub projects in gradle the auto generated IDE module name is of the form "parent/child" is there any way to configure this to be just "child" from either gradle configuration or IDE configuration?
    g
    • 2
    • 2
  • t

    tlaukkan

    09/04/2017, 12:29 PM
    With latest IntelliJIdea update, when running kotlin Java main class I can see it randomly not finding assets from classpath which are in resources folder. Sometimes program startups and sometimes fails. Never quite seen behaviour like this before
    k
    • 2
    • 2
  • m

    mantono

    09/08/2017, 7:15 AM
    Whenever I press enter on auto-completion in Intellij, a new line is also created, which is really annoying. Anyone have an idea what could cause this?
    y
    • 2
    • 2
  • s

    stantronic

    09/08/2017, 8:51 AM
    Is there any way to automatically rearrange kotlin files in Intellij? E.g. companion objects always at the top, private functions on the bottom etc.
    y
    k
    • 3
    • 4
  • h

    hho

    09/08/2017, 9:47 AM
    The idea is, that you comment what you were doing when the error happened...
    e
    • 2
    • 1
  • s

    spand

    09/08/2017, 11:24 AM
    Well, some of them contains your own sourcecode so auto uploading is a bit reckless
    e
    • 2
    • 1
  • d

    Dalinar

    09/08/2017, 12:24 PM
    is there a way to disable IJ inserting
    @NotNull
    or
    @Nullable
    when you do some alt-enter commands like adding a parameter to a
    fun
    .. ? .. I mean you insert a parameter into a fun call that is more than the amount of actual arguments the fun takes, so it recommends to insert the parameter into the
    fun
    declaration and when you do it - it often inserts a these annotations as well in the middle of the new parameters
    y
    • 2
    • 1
  • m

    mikkom

    09/10/2017, 7:15 AM
    IDEA keeps telling me the following
    Outdated Kotlin Runtime
    Your version of Kotlin runtime in 'Maven: org.jetbrains.kotlin:kotlin-stdlib:1.1.2-4' library is 1.1.2-4, while plugin version is 1.1.4-release-IJ2017.2-3.
    Runtime library should be updated to avoid compatibility problems.
    However in the root pom.xml I have
    <kotlin.version>1.1.4-3</kotlin.version>
    and
    mvn dependency:tree
    shows that all Kotlin deps have version 1.1.4-3. What gives?
    p
    • 2
    • 1
Powered by Linen
Title
m

mikkom

09/10/2017, 7:15 AM
IDEA keeps telling me the following
Outdated Kotlin Runtime
Your version of Kotlin runtime in 'Maven: org.jetbrains.kotlin:kotlin-stdlib:1.1.2-4' library is 1.1.2-4, while plugin version is 1.1.4-release-IJ2017.2-3.
Runtime library should be updated to avoid compatibility problems.
However in the root pom.xml I have
<kotlin.version>1.1.4-3</kotlin.version>
and
mvn dependency:tree
shows that all Kotlin deps have version 1.1.4-3. What gives?
p

pawel.barszcz

09/10/2017, 7:46 PM
just in case: have you refreshed maven project in IntelliJ after changing Kotlin version in
pom.xml
?
View count: 1