mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-03-01 13:46:02 +01:00
Unbind VimDataType from Variable
This commit is contained in:
parent
d27f87fbb8
commit
6eb47567e8
src/main/java/com/maddyhome/idea/vim/vimscript/model
@ -75,7 +75,7 @@ data class LetCommand(
|
||||
}
|
||||
|
||||
val leftValue = VimPlugin.getVariableService().getNullableVariableValue(variable, editor, context, vimContext)
|
||||
if (leftValue?.isLocked == true && leftValue.lockOwner?.name == variable.name) {
|
||||
if (leftValue?.isLocked == true && (leftValue.lockOwner as? Variable)?.name == variable.name) {
|
||||
throw ExException("E741: Value is locked: ${variable.toString(editor, context, vimContext)}")
|
||||
}
|
||||
val rightValue = expression.evaluate(editor, context, vimContext)
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
package com.maddyhome.idea.vim.vimscript.model.datatypes
|
||||
|
||||
import com.maddyhome.idea.vim.vimscript.model.expressions.Variable
|
||||
|
||||
sealed class VimDataType {
|
||||
|
||||
abstract fun asDouble(): Double
|
||||
@ -40,7 +38,7 @@ sealed class VimDataType {
|
||||
|
||||
abstract fun deepCopy(level: Int = 100): VimDataType
|
||||
|
||||
var lockOwner: Variable? = null
|
||||
var lockOwner: Any? = null
|
||||
var isLocked: Boolean = false
|
||||
|
||||
abstract fun lockVar(depth: Int)
|
||||
|
Loading…
Reference in New Issue
Block a user