backend: improve type operators support:

* add initial support for casts with generics;
* optimize out the casts to subtypes

Also add tests unchecked_cast{1,2}, the latter is disabled.
This commit is contained in:
Svyatoslav Scherbina
2017-01-20 11:20:32 +07:00
committed by SvyatoslavScherbina
parent 9bf0380048
commit 65444ec690
7 changed files with 94 additions and 33 deletions
+11
View File
@@ -208,6 +208,17 @@ task cast_simple(type: RunKonanTest) {
source = "codegen/basics/cast_simple.kt"
}
task unchecked_cast1(type: RunKonanTest) {
goldValue = "17\n17\n42\n42\n"
source = "codegen/basics/unchecked_cast1.kt"
}
task unchecked_cast2(type: RunKonanTest) {
disabled = true
goldValue = "Ok\n"
source = "codegen/basics/unchecked_cast2.kt"
}
task null_check(type: RunKonanTest) {
source = "codegen/basics/null_check.kt"
}