Removed KtScope.Empty and created util function emptyScope

This commit is contained in:
Stanislav Erokhin
2015-11-03 21:51:36 +03:00
parent 4e891a3f98
commit a90ca14033
18 changed files with 44 additions and 48 deletions
@@ -99,7 +99,7 @@ public class IncrementalPackageFragmentProvider(
val memberScope: NotNullLazyValue<KtScope> = storageManager.createLazyValue {
if (fqName !in fqNamesToLoad) {
KtScope.Empty
KtScope.empty(this)
}
else {
val moduleMapping = incrementalCache.getModuleMappingData()?.let { ModuleMapping.create(it) }
@@ -128,7 +128,7 @@ public class IncrementalPackageFragmentProvider(
}
if (scopes.isEmpty()) {
KtScope.Empty
KtScope.empty(this)
}
else {
ChainedScope(this, "Member scope for incremental compilation: union of package parts data", *scopes.toTypedArray())
@@ -151,7 +151,7 @@ public class IncrementalPackageFragmentProvider(
val memberScope = storageManager.createLazyValue {
val partsData = partsNames.map { incrementalCache.getPackagePartData(it) }.filterNotNull()
if (partsData.isEmpty())
KtScope.Empty
KtScope.empty(this)
else {
val scopes = partsData.map { IncrementalPackageScope(JvmProtoBufUtil.readPackageDataFrom(it.data, it.strings)) }
ChainedScope(this,
@@ -67,7 +67,7 @@ class PropagationHeuristics {
arrayTypeFromSuper.getConstructor(),
arrayTypeFromSuper.isMarkedNullable(),
Arrays.asList(new TypeProjectionImpl(Variance.OUT_VARIANCE, elementTypeInSuper)),
KtScope.Empty.INSTANCE$);
KtScope.Companion.empty(elementType.getMemberScope().getContainingDeclaration()));
data.reportError("Return type is not a subtype of overridden method. " +
"To fix it, add annotation with Kotlin signature to super method with type "