Use more specific error for secondary constructor bodies in inline classes

- Also, this error allows IDE to provide quick-fix that changes language
 version in a project that simplifies the adoption
 - There is no point in
 changing K2 part as there this feature will be enabled by default

 ^KT-56224 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2023-02-01 11:23:19 +01:00
committed by Space Team
parent f3e022e4ca
commit c586d7a03a
10 changed files with 58 additions and 3 deletions
@@ -0,0 +1,9 @@
// !LANGUAGE: -ValueClassesSecondaryConstructorWithBody
// WITH_STDLIB
@JvmInline
value class Foo(val x: String) {
constructor(i: Int) : this(i.toString()) <!UNSUPPORTED_FEATURE!>{<!>
println(i)
}
}