Load built-ins from module dependencies in JVM compiler

Introduce a new method KotlinClassFinder#findBuiltInsData, which is only
implemented correctly in the JvmCliVirtualFileFinder because it's only used in
the compiler code at the moment.

Introduce JvmBuiltInsPackageFragmentProvider, the purpose of which is to look
for .kotlin_builtins files in the classpath and provide definitions of
built-ins from those files.

Also exclude script.runtime from compilation because, as other excluded
modules, it has no dependency on the stdlib and is no longer compilable from
the IDE now, because it cannot resolve built-ins from anywhere
This commit is contained in:
Alexander Udalov
2016-10-17 18:11:38 +03:00
parent 0b59c71340
commit e0989caf46
14 changed files with 145 additions and 25 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
compiler/testData/cli/jvm/noStdlib.kt:4:19: error: unresolved reference: primaryConstructor
String::class.primaryConstructor
^
compiler/testData/cli/jvm/noStdlib.kt:1:8: error: unresolved reference: kotlin
import kotlin.reflect.*
^
compiler/testData/cli/jvm/noStdlib.kt:5:5: error: unresolved reference: listOf
listOf(42)
^