This was a kotlin error that I encountered while I was working with Teamcity.
The error message was
Unit can’t be called in this context by implicit receiver
What does this mean?
I am following this Kotlin example (Kotlin DSL | TeamCity On-Premises Documentation) and trying to write a kotlin script for my CI.
This is my code snippet
steps {
script {
name = "Style check"
id("StyleCheck")
enabled = false
scriptContent = """
#!/bin/bash
make docker run="make ci lint"
""".trimIndent()
}
I get an Error for the id() call which says
- What does the error message mean?
- How can I use
id()
call as given in the example?