From 1cb3af902c8f2e3f73e7c78781373f1ab5788772 Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Mon, 13 Oct 2014 20:14:45 +0400 Subject: Remove BindingContext and migrate to ResolveSession, discover symbols for {code ...} directive. --- test/src/TestAPI.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/src') diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt index b885a15f..ccef8919 100644 --- a/test/src/TestAPI.kt +++ b/test/src/TestAPI.kt @@ -30,15 +30,15 @@ public fun verifyModel(vararg files: String, verifier: (DocumentationModule) -> val options = DocumentationOptions(includeNonPublic = true) - val documentation = environment.withContext { environment, module, context -> - val fragments = environment.getSourceFiles().map { context.getPackageFragment(it) }.filterNotNull().distinct() + val documentation = environment.withContext { environment, session -> + val fragments = environment.getSourceFiles().map { session.getPackageFragment(it.getPackageFqName()) }.filterNotNull().distinct() val descriptors = hashMapOf>() for ((name, parts) in fragments.groupBy { it.fqName }) { descriptors.put(name.asString(), parts.flatMap { it.getMemberScope().getAllDescriptors() }) } val documentationModule = DocumentationModule("test") - val documentationBuilder = DocumentationBuilder(context, options) + val documentationBuilder = DocumentationBuilder(session, options) with(documentationBuilder) { documentationModule.appendFragments(fragments) } -- cgit