Minor. Change return type for method WritableScope.changeLockLevel
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.resolve.scopes
|
||||
|
||||
import com.google.common.collect.Multimap
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.descriptors.ClassifierDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.VariableDescriptor
|
||||
|
||||
public interface WritableScope : JetScope {
|
||||
public enum class LockLevel {
|
||||
@@ -29,7 +29,7 @@ public interface WritableScope : JetScope {
|
||||
|
||||
public fun takeSnapshot(): JetScope
|
||||
|
||||
public fun changeLockLevel(lockLevel: LockLevel): WritableScope
|
||||
public fun changeLockLevel(lockLevel: LockLevel)
|
||||
|
||||
public fun addVariableDescriptor(variableDescriptor: VariableDescriptor)
|
||||
|
||||
|
||||
@@ -58,12 +58,11 @@ public class WritableScopeImpl @jvmOverloads constructor(
|
||||
|
||||
override fun getContainingDeclaration() = ownerDeclarationDescriptor
|
||||
|
||||
override fun changeLockLevel(lockLevel: WritableScope.LockLevel): WritableScope {
|
||||
override fun changeLockLevel(lockLevel: WritableScope.LockLevel) {
|
||||
if (lockLevel.ordinal() < this.lockLevel.ordinal()) {
|
||||
throw IllegalStateException("cannot lower lock level from " + this.lockLevel + " to " + lockLevel + " at " + toString())
|
||||
}
|
||||
this.lockLevel = lockLevel
|
||||
return this
|
||||
}
|
||||
|
||||
protected fun checkMayRead() {
|
||||
|
||||
Reference in New Issue
Block a user