backend: improve typealias support:

* handle TypeAliasConstructorDescriptor in codegen
* ignore ignore typealias declaration in codegen

Also add test 'typealias1'.
This commit is contained in:
Svyatoslav Scherbina
2017-01-13 16:57:04 +07:00
committed by SvyatoslavScherbina
parent 65444ec690
commit 0958d32605
4 changed files with 25 additions and 4 deletions
+5
View File
@@ -143,6 +143,11 @@ task safe_cast(type: RunKonanTest) {
source = "codegen/basics/safe_cast.kt"
}
task typealias1(type: RunKonanTest) {
goldValue = "42\n"
source = "codegen/basics/typealias1.kt"
}
task aritmetic(type: RunKonanTest) {
source = "codegen/function/arithmetic.kt"
}
@@ -0,0 +1,6 @@
fun main(args: Array<String>) {
println(Bar(42).x)
}
class Foo(val x: Int)
typealias Bar = Foo