Skip to content

Commit aa7c68f

Browse files
authored
Merge pull request #132 from jchyb/scala-3-fixes
[Scala 3 migration] Replace empty sealed trait with an opaque type in Scala 3
2 parents 480b4c0 + 31bbc8f commit aa7c68f

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.scalafmt.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
version = 3.5.3
1+
version = 3.5.8
22

33
runner.dialect = scala213
44

5+
fileOverride {
6+
"glob:**/src/main/scala-3/**" {
7+
runner.dialect = scala3
8+
}
9+
}
10+
511
maxColumn = 100
612

713
// Vertical alignment is pretty, but leads to bigger diffs
File renamed without changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package sangria.util
2+
3+
object tag {
4+
def apply[U] = new Tagger[U]
5+
6+
type Tag[U]
7+
opaque type Tagged[U] = Tag[U]
8+
type @@[+T, U] = (T & Tagged[U]) | Null
9+
10+
class Tagger[U] {
11+
def apply[T](t: T): T @@ U = t.asInstanceOf[T @@ U]
12+
}
13+
}

0 commit comments

Comments
 (0)