You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me that record4s does not work correctly neither in inline nor transparent inline functions (the difference is important since they are inlined at different times iirc). Probably this is an issue with how the type checking of transparent functions works, so not strictly a bug in this library, but perhaps you can find a better workaround or escalate the issue to the Scala compiler. In any case, I hope that my report will at least serve as documentation for other users.
val res0: com.github.tarao.record4s.%{val name: String; val bla: Int} = %(name = hello, bla = 123)
def foo(): com.github.tarao.record4s.%{val name: String; val bla: Int}
-- [E008] Not Found Error: -----------------------------------------------------
2 | %(name = "hello") + (bla = 123)
| ^^^^^^^^^^^^^^^^^^^
|value + is not a member of Any, but could be made available as an extension method.
|
|One of the following imports might make progress towards fixing the problem:
|
| import math.Fractional.Implicits.infixFractionalOps
| import math.Integral.Implicits.infixIntegralOps
| import math.Numeric.Implicits.infixNumericOps
|
1 error found
-- [E008] Not Found Error: -----------------------------------------------------
2 | %(name = "hello") + (bla = 123)
| ^^^^^^^^^^^^^^^^^^^
|value + is not a member of Any, but could be made available as an extension method.
|
|One of the following imports might make progress towards fixing the problem:
|
| import math.Fractional.Implicits.infixFractionalOps
| import math.Integral.Implicits.infixIntegralOps
| import math.Numeric.Implicits.infixNumericOps
|
1 error found
def foobar(): com.github.tarao.record4s.%{val name: String; val bla: Int}
val res1: com.github.tarao.record4s.%{val name: String; val bla: Int} = %(name = hello, bla = 123)
PS: Let me just say that this is an amazing library that doesn't have nearly as many stars as it deserves. It is not only surprisingly usable, but also serves as a good example of whitebox macro techniques 👍
The text was updated successfully, but these errors were encountered:
It seems to me that record4s does not work correctly neither in inline nor transparent inline functions (the difference is important since they are inlined at different times iirc). Probably this is an issue with how the type checking of transparent functions works, so not strictly a bug in this library, but perhaps you can find a better workaround or escalate the issue to the Scala compiler. In any case, I hope that my report will at least serve as documentation for other users.
Output:
PS: Let me just say that this is an amazing library that doesn't have nearly as many stars as it deserves. It is not only surprisingly usable, but also serves as a good example of whitebox macro techniques 👍
The text was updated successfully, but these errors were encountered: