Add more JSR 223 and repl tests, fix double aggregation of GenericRepl state

- repl test with compilation error
- JSR 223 compilable tests
This commit is contained in:
Ilya Chernikov
2017-03-21 13:30:04 +01:00
parent adc541c3b1
commit 319440718c
3 changed files with 126 additions and 81 deletions
@@ -38,7 +38,7 @@ open class GenericRepl protected constructor(
protected val compiler: ReplCompiler by lazy { GenericReplCompiler(disposable, scriptDefinition, compilerConfiguration, messageCollector) }
protected val evaluator: ReplFullEvaluator by lazy { GenericReplCompilingEvaluator(compiler, compilerConfiguration.jvmClasspathRoots, baseClassloader, fallbackScriptArgs, repeatingMode) }
override fun createState(lock: ReentrantReadWriteLock): IReplStageState<*> = AggregatedReplStageState(compiler.createState(lock), evaluator.createState(lock), lock)
override fun createState(lock: ReentrantReadWriteLock): IReplStageState<*> = evaluator.createState(lock)
override fun check(state: IReplStageState<*>, codeLine: ReplCodeLine): ReplCheckResult = compiler.check(state, codeLine)