Join Slack
Powered by
Ok, this is weird. This code doesn't compile (k2.0...
# compiler
j
JP Sugarbroad
11/20/2024, 11:57 PM
Ok, this is weird. This code doesn't compile (k2.0.21):
Copy code
enum class E(val value: String){ header("header") }
e
ephemient
11/21/2024, 12:01 AM
https://youtrack.jetbrains.com/issue/KT-52315
j
JP Sugarbroad
11/21/2024, 12:04 AM
thanks!
e
ephemient
11/21/2024, 1:12 AM
until you can upgrade to a fixed kotlin version, you can escape the keyword e.g. ``header``; that's what I did for kotlinpoet
https://github.com/square/kotlinpoet/pull/1248
👍 1
2
Views
Open in Slack
Previous
Next