From 804a4cc1ff9fa159c576be7c685dbb81220c11da Mon Sep 17 00:00:00 2001 From: som-snytt Date: Fri, 15 Apr 2016 01:28:18 -0700 Subject: SI-9749 REPL strip lead ws on dot continuation (#5097) Permit leading whitespace before `.` for continued selection. This is just to handle pastes, which will typically include indented text, and not to make dot-continuation especially robust. --- test/files/run/t9749-repl-dot.check | 8 ++++++++ test/files/run/t9749-repl-dot.scala | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/files/run/t9749-repl-dot.check create mode 100644 test/files/run/t9749-repl-dot.scala (limited to 'test/files/run') diff --git a/test/files/run/t9749-repl-dot.check b/test/files/run/t9749-repl-dot.check new file mode 100644 index 0000000000..5ffec4ce60 --- /dev/null +++ b/test/files/run/t9749-repl-dot.check @@ -0,0 +1,8 @@ + +scala> "3" +res0: String = 3 + +scala> .toInt +res1: Int = 3 + +scala> :quit diff --git a/test/files/run/t9749-repl-dot.scala b/test/files/run/t9749-repl-dot.scala new file mode 100644 index 0000000000..19cecbf444 --- /dev/null +++ b/test/files/run/t9749-repl-dot.scala @@ -0,0 +1,10 @@ + +import scala.tools.partest.ReplTest + +object Test extends ReplTest { + def code = + """ +"3" + .toInt + """ +} -- cgit v1.2.3