Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is it possible to use context function where function is needed? #21670

Unanswered
goshacodes asked this question in General Question
Discussion options

Hi! I want to pass context function where function is needed

This not compiles with scala 3:

@main def hello =
 def foo(x: Int)(using String): Int = 0
 def pass(x: Int => String => Int): Unit = ()
 pass(foo _)
 

While this compiles:

@main def hello =
 def foo(x: Int)(implicit s: String): Int = 0
 def pass(x: Int => String => Int): Unit = ()
 pass(foo _)

Is it a bug?

You must be logged in to vote

Replies: 0 comments

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

AltStyle によって変換されたページ (->オリジナル) /