scalac: v2.13.8
fastparse: v2.3.3
@ import fastparse._
import fastparse._
@ import NoWhitespace._
import NoWhitespace._
@ def fail[T: P] = Fail.!
defined function fail
@ val wat = "Shouldn't success"
wat: String = "Shouldn't success"
@ parse(wat, fail(_))
res4: Parsed[String] = Parsed.Failure(Position 1:1, found "Shouldn't ")
@ def fail[T: P]: P[Unit] = Fail.!
defined function fail
@ parse(wat, fail(_))
res6: Parsed[Unit] = Success(value = (), index = 0)
Observing this behaviour from repl: