Skip to content

Commit e420513

Browse files
authored
Merge pull request scala#150 from xuwei-k/view-bounds
avoid view bounds
2 parents b1c7e3e + 66e41da commit e420513

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared/src/main/scala/scala/util/parsing/combinator/Parsers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ trait Parsers {
604604
* @param es the list of expected elements
605605
* @return a Parser that recognizes a specified list of elements
606606
*/
607-
def accept[ES <% List[Elem]](es: ES): Parser[List[Elem]] = acceptSeq(es)
607+
def accept[ES](es: ES)(implicit f: ES => List[Elem]): Parser[List[Elem]] = acceptSeq(es)
608608

609609
/** The parser that matches an element in the domain of the partial function `f`.
610610
*
@@ -661,7 +661,7 @@ trait Parsers {
661661
* @param es the list of expected elements
662662
* @return a Parser that recognizes a specified list of elements
663663
*/
664-
def acceptSeq[ES <% Iterable[Elem]](es: ES): Parser[List[Elem]] =
664+
def acceptSeq[ES](es: ES)(implicit f: ES => Iterable[Elem]): Parser[List[Elem]] =
665665
es.foldRight[Parser[List[Elem]]](success(Nil)){(x, pxs) => accept(x) ~ pxs ^^ mkList}
666666

667667
/** A parser that always fails.

0 commit comments

Comments
 (0)