KT-13422 Type alias for Java exception class can be used as an object in 'throw' expression

Report NO_COMPANION_OBJECT for type aliases.
This commit is contained in:
Dmitry Petrov
2016-09-01 15:02:05 +03:00
parent c7f87e655c
commit 6428a7655d
4 changed files with 24 additions and 0 deletions
@@ -0,0 +1,7 @@
// +JDK
typealias Exn = java.lang.Exception
fun test() {
throw <!NO_COMPANION_OBJECT!>Exn<!>
}
@@ -0,0 +1,4 @@
package
public typealias Exn = java.lang.Exception
public fun test(): kotlin.Unit