Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with parser type in the documentation #1091

Open
TheDeadOne opened this issue Jul 5, 2022 · 0 comments · May be fixed by #1092
Open

Error with parser type in the documentation #1091

TheDeadOne opened this issue Jul 5, 2022 · 0 comments · May be fixed by #1092
Labels

Comments

@TheDeadOne
Copy link

TheDeadOne commented Jul 5, 2022

steps

  1. Open https://www.scala-sbt.org/1.x/docs/Parsing-Input.html#Combining+parsers
  2. Copy-paste next snippet to sbt console or build.sbt
val color: Parser[String] = literal("blue") | literal("green")

val select: Parser[String] = literal("fg") | literal("bg")

val setColor: Parser[(String, Char, String)] = select ~ ' ' ~ color

problem

error: type mismatch;
found   : sbt.internal.util.complete.Parser[((String, Char), String)]
required: sbt.internal.util.complete.Parser[(String, Char, String)]
val setColor: Parser[(String, Char, String)] = select ~ ' ' ~ color

expectation

Parser of type that described in the documentation.

notes

sbt 1.2.8, 1.6.2
scala 2.12.10

@TheDeadOne TheDeadOne added the bug label Jul 5, 2022
@xuwei-k xuwei-k transferred this issue from sbt/sbt Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant