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

Simple example no longer runs on scala 3.5.1 #320

Open
TimPigden opened this issue Sep 24, 2024 · 1 comment
Open

Simple example no longer runs on scala 3.5.1 #320

TimPigden opened this issue Sep 24, 2024 · 1 comment

Comments

@TimPigden
Copy link

import fastparse._
object TestFastParse {
def parseA[$: P] = P("a")

val Parsed.Success(value, successIndex) = parse("a", parseA(_))

assert(value == (), successIndex == 1)
}

.
/home/tim/repos/untitled/src/main/scala/TestFastParse.scala:5:56
Context bounds will map to context parameters.
A using clause is needed to pass explicit arguments to them.
This code can be rewritten automatically under -rewrite -source 3.4-migration.
val Parsed.Success(value, successIndex) = parse("a", parseA(_))

@vladimir-lu
Copy link

This can be manually worked around by replacing parse("a", parseA(_)) with parse("a", c => parseA(using c)) since a using keyword now appears to be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants