Search code examples
mavenintellij-ideakotlin

Using Kotlin synthetic properties


I'm trying Vert.x in Kotlin. I have the following piece of code:

val deploymentOptions = DeploymentOptions()
deploymentOptions.setConfig(JsonObject().put("http.port", 8081))

Everything works fine. However, IntelliJ IDEA reports on the second line that I should use "Kotlin synthetic properties".

Any idea how to do that in this case. Also, I'm using Maven.


Solution

  • Hit alt+enter on that line. IDEA should suggest you a solution. Pick one.

    Probably:

    deploymentOptions.config = JsonObject().put("http.port", 8081)