FIR resolve: support star imports, enum entries

This commit is contained in:
Mikhail Glukhikh
2018-03-22 11:42:51 +03:00
parent 929573e0d5
commit 093a236e34
24 changed files with 278 additions and 24 deletions
+16
View File
@@ -0,0 +1,16 @@
interface Some
object O1 : Some
object O2 : Some
enum class SomeEnum(val x: Some) {
FIRST(O1) {
override fun check(y: Some): Boolean = true
},
SECOND(O2) {
override fun check(y: Some): Boolean = y == O2
};
abstract fun check(y: Some): Boolean
}
+27
View File
@@ -0,0 +1,27 @@
FILE: enum.kt
(resolved) public? abstract interface Some() {
}
(resolved) public? final object O1() : R/Some/ {
}
(resolved) public? final object O2() : R/Some/ {
}
(resolved) public? final enum class SomeEnum() {
public? constructor(x: R/Some/)
(resolved) public? final enum entry FIRST() : R/SomeEnum/ {
public? open? override function check(y: R/Some/): R/error: Symbol not found/ {
STUB
}
}
(resolved) public? final enum entry SECOND() : R/SomeEnum/ {
public? open? override function check(y: R/Some/): R/error: Symbol not found/ {
STUB
}
}
public? abstract function check(y: R/Some/): R/error: Symbol not found/
}
@@ -0,0 +1,7 @@
package test
sealed class Test {
object O : Test()
class Extra(val x: Int): Test
}
@@ -0,0 +1,11 @@
package other
import test.Test.*
abstract class Factory {
abstract fun createTest(): Test
abstract fun createObj(): O
abstract fun createExtra(): Extra
}
@@ -0,0 +1,9 @@
FILE: sealedStarImport.kt
(resolved) public? abstract class Factory() {
public? abstract function createTest(): R/error: Symbol not found/
public? abstract function createObj(): R/test/Test.O/
public? abstract function createExtra(): R/test/Test.Extra/
}
@@ -0,0 +1,5 @@
package b.d
expect interface Other
expect class Another
@@ -0,0 +1,5 @@
package a.d
import b.d.*
fun foo(arg: Other): Another
@@ -0,0 +1,2 @@
FILE: simpleStarImport.kt
public? final? function foo(arg: R/b/d/Other/): R/b/d/Another/