Hide constructors accepting inline class parameters

This commit is contained in:
Dmitry Petrov
2018-09-07 14:16:20 +03:00
parent 8a5dbe1c6b
commit 006c0aa740
28 changed files with 663 additions and 4 deletions
@@ -0,0 +1,18 @@
// !LANGUAGE: +InlineClasses
// !DIAGNOSTICS: -UNUSED_PARAMETER
inline class X(val x: Int)
inline class Z(val x: Int)
class TestOk1(val a: Int, val b: Int) {
constructor(x: X) : this(x.x, 1)
}
class TestErr1(val a: Int) {
<!CONFLICTING_JVM_DECLARATIONS!>constructor(x: X)<!> : this(x.x)
}
class <!CONFLICTING_JVM_DECLARATIONS!>TestErr2(val a: Int, val b: Int)<!> {
<!CONFLICTING_JVM_DECLARATIONS!>constructor(x: X)<!> : this(x.x, 1)
<!CONFLICTING_JVM_DECLARATIONS!>constructor(z: Z)<!> : this(z.x, 2)
}