How to define a method with implicit parameter list ? #16053
Unanswered
fmonniot
asked this question in
Metaprogramming
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there,
I wanted to know how can I generate a new method (I'm currently using
Symbol.newMethod
) which contains an implicit (or given/erased) parameter list. I'm using Scala 3.2.0.Generating a method with multiple parameter list is doable with
MethodType
, and here is how I would do it:Looking at
Quotes.scala
, it seems thatMethodType
does expose anisImplicit
method but there is no constructor that let us set that value. Is marking a parameter list something done with another type (a bit like creating a nullary method require the use ofByNameType
) ? Or is it because the implicit modifier goes onto another part of the declaration ?Beta Was this translation helpful? Give feedback.
All reactions