summaryrefslogtreecommitdiff
path: root/test/files/run/t1100.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-24 14:19:59 +0000
committerPaul Phillips <paulp@improving.org>2011-10-24 14:19:59 +0000
commit9bdbc5bb34fbdab616477a7aecdeb94820d6135b (patch)
tree25083bacdda182acab4e68c1daed84e11f396b67 /test/files/run/t1100.scala
parent6b70b7d23a23bca02f98a50d824d20db3bb3f8eb (diff)
downloadscala-9bdbc5bb34fbdab616477a7aecdeb94820d6135b.tar.gz
scala-9bdbc5bb34fbdab616477a7aecdeb94820d6135b.tar.bz2
scala-9bdbc5bb34fbdab616477a7aecdeb94820d6135b.zip
Test case for SI-1100/SI-5108.
Diffstat (limited to 'test/files/run/t1100.scala')
-rw-r--r--test/files/run/t1100.scala17
1 files changed, 17 insertions, 0 deletions
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))
+ }
+}