Fix state conversion, fix tests
This commit is contained in:
@@ -70,7 +70,7 @@ open class GenericReplChecker(
|
||||
|
||||
override fun check(state: IReplStageState<*>, codeLine: ReplCodeLine): ReplCheckResult {
|
||||
state.lock.write {
|
||||
val checkerState = state.asState<GenericReplCheckerState>()
|
||||
val checkerState = state.asState(GenericReplCheckerState::class.java)
|
||||
val scriptFileName = makeScriptBaseName(codeLine, checkerState.generation.get())
|
||||
val virtualFile =
|
||||
LightVirtualFile("$scriptFileName${KotlinParserDefinition.STD_SCRIPT_EXT}", KotlinLanguage.INSTANCE, StringUtil.convertLineSeparators(codeLine.code)).apply {
|
||||
|
||||
@@ -47,7 +47,7 @@ open class GenericReplCompiler(disposable: Disposable,
|
||||
|
||||
override fun compile(state: IReplStageState<*>, codeLine: ReplCodeLine): ReplCompileResult {
|
||||
state.lock.write {
|
||||
val compilerState = state.asState<GenericReplCompilerState>()
|
||||
val compilerState = state.asState(GenericReplCompilerState::class.java)
|
||||
|
||||
val currentGeneration = compilerState.generation.get()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user