Fixed bug with objects access in global initialisers + test

This commit is contained in:
Igor Chevdar
2018-07-03 20:16:27 +03:00
parent a8d6113308
commit c9e7a4faed
3 changed files with 24 additions and 12 deletions
+4
View File
@@ -266,6 +266,10 @@ task objectInitialization1(type: RunKonanTest) {
source = "codegen/object/initialization1.kt"
}
task object_globalInitializer(type: RunStandaloneKonanTest) {
source = "codegen/object/globalInitializer.kt"
}
task check_type(type: RunKonanTest) {
goldValue = "true\nfalse\ntrue\ntrue\ntrue\ntrue\n"
source = "codegen/basics/check_type.kt"
@@ -0,0 +1,7 @@
// Does not fail with TR.
public val z: Any = Z
private object Z
fun main(args: Array<String>) { }