Rewrote enum lowering to support usage from other modules.

- Split up enum lowering into two stages: descriptors creation and IR creation.
- Added link stage test.
- Enum.valueOf() uses binary search instead of linear.
This commit is contained in:
Igor Chevdar
2017-03-03 13:47:05 +03:00
parent bf65a78a93
commit 0ff306ad3a
10 changed files with 280 additions and 141 deletions
@@ -0,0 +1,7 @@
import a.*
fun main(args: Array<String>) {
println(A.Z1.x)
println(A.valueOf("Z2").x)
println(A.values()[2].x)
}