In the below code:
opaque type Id = Long
inline given IsColumn[Id] = ???
case class Task(id: Id, title: Task.Title)
object Task:
opaque type Title = String
inline given IsColumn[Title] = ???
val table = Table.of[Task].withName("tasks").build
Columns in table end up being:
(TypedColumn["id", Long, "tasks", EmptyTuple], TypedColumn["title", Task.Title, "tasks", EmptyTuple])
And the only difference between Id and Title is that they're defined at different levels. I managed to narrow down this problem to quotidian.MacroMirror, i.e. at this moment at the very beginning of MacroTable existence I already have wrong types.
In the below code:
Columns in
tableend up being:And the only difference between
IdandTitleis that they're defined at different levels. I managed to narrow down this problem toquotidian.MacroMirror, i.e. at this moment at the very beginning ofMacroTableexistence I already have wrong types.