From 9bdbc5bb34fbdab616477a7aecdeb94820d6135b Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 24 Oct 2011 14:19:59 +0000 Subject: Test case for SI-1100/SI-5108. --- test/files/run/t1100.check | 4 ++++ test/files/run/t1100.scala | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/files/run/t1100.check create mode 100644 test/files/run/t1100.scala (limited to 'test') diff --git a/test/files/run/t1100.check b/test/files/run/t1100.check new file mode 100644 index 0000000000..d3a49a47df --- /dev/null +++ b/test/files/run/t1100.check @@ -0,0 +1,4 @@ +[1.4] error: errors are propagated + +aaab + ^ diff --git a/test/files/run/t1100.scala b/test/files/run/t1100.scala new file mode 100644 index 0000000000..6b95fd6ecb --- /dev/null +++ b/test/files/run/t1100.scala @@ -0,0 +1,17 @@ +import scala.util.parsing.combinator.Parsers +import scala.util.parsing.input.CharSequenceReader + +class TestParsers extends Parsers { + type Elem = Char + + def p: Parser[List[Char]] = rep1(p1) + def p1: Parser[Char] = accept('a') | err("errors are propagated") +} + +object Test { + def main(args: Array[String]): Unit = { + val tstParsers = new TestParsers + val s = new CharSequenceReader("aaab") + println(tstParsers.p(s)) + } +} -- cgit v1.2.3