Skip to content

Commit

Permalink
test(parsley-debug): reworked the overloadings
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Apr 27, 2024
1 parent 60f1ef7 commit 6e73e55
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ abstract class Tokens {

@experimental @parsley.debuggable
private object overloads {
def checkNo(symb: String, name: String, reasonGiven: String): Parsley[Nothing] = checkNo(symb, name, reasonGiven)
def checkNo(symb: String, reason: String): Parsley[Nothing] = checkNo(symb, reason)
def foo(x: Int) = pure(x)
def foo(s: String) = string(s)

lazy val p: Parsley[Int] = checkNo("", "", "")
lazy val q: Parsley[Int] = checkNo("", "")
lazy val p: Parsley[Int] = foo(7)
lazy val q: Parsley[String] = foo("hello")
}

@experimental @parsley.debuggable
Expand Down

0 comments on commit 6e73e55

Please sign in to comment.