belamenso / tyql

0 stars 0 forks source link

`scalafmt` bug #1

Open belamenso opened 2 days ago

belamenso commented 2 days ago

This code from RestrictedQuery.scala

type ToRestrictedQueryRef[QT <: Tuple] = Tuple.Map[ZipWithIndex[Elems[QT]], [T] =>> T match
  case (elem, index) => RestrictedQueryRef[elem, SetResult, index]]

produces this error

src/main/scala/tyql/query/RestrictedQuery.scala:121: error: [dialect scala3future] `outdent` expected but `]` found
case (elem, index) => RestrictedQueryRef[elem, SetResult, index]]

when running

$ scalafmt --config ./.scalafmt.conf .

with this minimal .scalafmt.conf

version = 3.8.3
runner.dialect = scala3future
belamenso commented 2 days ago

This all works when you put the last ] on its own line:

type ToRestrictedQueryRef[QT <: Tuple] = Tuple.Map[ZipWithIndex[Elems[QT]], [T] =>> T match
  case (elem, index) => RestrictedQueryRef[elem, SetResult, index]
]