REPL: don't fail on a callable reference

There should probably be a special kind of property, but at least it won't
throw an exception for now
This commit is contained in:
Alexander Udalov
2014-07-27 17:10:20 -07:00
parent 8d2ab0fd52
commit 4213ce318e
5 changed files with 33 additions and 6 deletions
@@ -125,7 +125,7 @@ public class ReplFromTerminal {
return WhatNextAfterOneLine.QUIT;
}
if (line.startsWith(":")) {
if (line.startsWith(":") && (line.length() == 1 || line.charAt(1) != ':')) {
boolean notQuit = oneCommand(line.substring(1));
return notQuit ? WhatNextAfterOneLine.READ_LINE : WhatNextAfterOneLine.QUIT;
}