JetBrains / kotlin-playground

Self-contained component to embed in websites for running Kotlin code
https://jetbrains.github.io/kotlin-playground/examples/
Apache License 2.0
447 stars 80 forks source link

Kotlin 2.0.0-Beta 2 on Kotlin Playground #199

Closed eecs441staff closed 8 months ago

eecs441staff commented 8 months ago

I was so excited to try the backing field feature of Kotlin 2.0 on Kotlin Playground, only to be met with, "The feature "explicit backing fields" is experimental and should be enabled explicitly."

How do I enable this experimental feature?

nikpachoo commented 8 months ago

Hi, @eecs441staff! Could you please share the code sample you tried to run? There is a button "Copy Link" in Playground for sharing the code.

nikpachoo commented 8 months ago

Related PR for Compiler-Server #197

eecs441staff commented 8 months ago

Thanks for looking into it. Here's the code. The commented out version works.

https://pl.kotl.in/eUTQezzuk

nikpachoo commented 8 months ago

@eecs441staff, you can try now - https://pl.kotl.in/eUTQezzuk. Thank you for raising the question!