  
      return _stdoutHandler.compilerOutput.future;
    }
-@@ -545,6 +576,7 @@ class ResidentCompiler {
+@@ -545,6 +582,7 @@ class ResidentCompiler {
        .listen((String message) { printError(message); });
  
      _server.stdin.writeln('compile $scriptUri');

     _compileRequestNeedsConfirmation = false;
     return _stdoutHandler.compilerOutput.future;
   }
@@ -629,6 +663,7 @@ class ResidentCompiler {
   /// kernel file.
   void reset() {
     _server?.stdin?.writeln('reset');

 
     return _stdoutHandler.compilerOutput.future;
   }
@@ -570,7 +608,7 @@ class ResidentCompiler {
   }
 
   Future<CompilerOutput> _compileExpression(_CompileExpressionRequest request) async {
-    _stdoutHandler.reset(suppressCompilerMessages: true);
+    _stdoutHandler.reset(suppressCompilerMessages: true, expectSources: false);
 
     // 'compile-expression' should be invoked after compiler has been started,
     // program was compiled.
@@ -597,6 +635,7 @@ class ResidentCompiler {
   void accept() {
     if (_compileRequestNeedsConfirmation) {
       _server.stdin.writeln('accept');
