How to use quotes to add a method with a dynamic name #20417
              
                Unanswered
              
          
                  
                    
                      pwharned
                    
                  
                
                  asked this question in
                Metaprogramming
              
            Replies: 1 comment
-
| Take a look at this discussion, it may be of help: https://users.scala-lang.org/t/scala-3-macro-create-instance-of-a-type/8016/4 | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    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.
-
I am trying to return a new class inline defined methods. This is easy enough with quotes.
However, i want to be able to rename the methods based on a string that is evaluated at compile time.
I was able to figure out how to do this with the Expr API after three days but my code became so wacked out it refused to compile for some other reasons.
What I would like is help either
A: Producing this structure with the Expr API so I can add a method with a new name or
B: Is it posssible with quotes api to do this?
Beta Was this translation helpful? Give feedback.
All reactions