Skip to content

How to construct a structural type via metaprogramming? #14056

You must be logged in to vote

You need to use the Refined type wich does have a Refined.apply factory method.

Here is a prototype macro that converts a tuple ("name1" -> T1, "name2" -> T2, ...) into Record { val name1: T1; val name2: T2; ... }:

Replies: 2 comments 12 replies

You must be logged in to vote
7 replies
@prolativ

@AugustNagro

@prolativ

@AugustNagro

@nicolasstucki

Answer selected by bishabosha

You must be logged in to vote
5 replies
@prolativ

@AugustNagro

@prolativ

@AugustNagro

@nicolasstucki

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