Support type aliases as bare types after 'is/as'.

This commit is contained in:
Dmitry Petrov
2016-11-10 14:52:41 +03:00
parent 21f2febf82
commit 6876f0e4d2
8 changed files with 139 additions and 1 deletions
@@ -0,0 +1,11 @@
// WITH_RUNTIME
typealias L<T> = List<T>
fun box(): String {
val test: Collection<Int> = listOf(1, 2, 3)
if (test !is L) return "test !is L"
val test2 = test as L
if (test.toList() != test2) return "test.toList() != test2"
return "OK"
}