compile
fun compile(@Language(value = "kotlin") code: String, dependencyCodes: List<String> = emptyList(), javaSourceRoots: List<Path> = emptyList(), jvmClasspathRoots: List<Path> = listOf(File(CharRange::class.java.protectionDomain.codeSource.location.path).toPath()), allowCompilationErrors: Boolean = shouldCompileTestSnippets, languageVersionSettings: LanguageVersionSettings = LanguageVersionSettingsImpl.DEFAULT): KtFile
Compiles a given code string using Kotlin's Analysis API.
Throws
if the given code snippet does not compile