Allow return statements in secondary constructors
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
|
||||
class A {
|
||||
init {
|
||||
<!RETURN_NOT_ALLOWED!>return<!>
|
||||
<!RETURN_NOT_ALLOWED!>return 1<!>
|
||||
}
|
||||
constructor() {
|
||||
if (1 == 1) {
|
||||
return
|
||||
return <!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>
|
||||
}
|
||||
return
|
||||
return <!TYPE_MISMATCH!>foo()<!>
|
||||
}
|
||||
|
||||
fun foo(): Int = 1
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package
|
||||
|
||||
internal final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final fun foo(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user