File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ trait RType
2
+ trait TypeEntry {
3
+ def typeAdapter : TypeAdapter [_] = ???
4
+ }
5
+
6
+ trait TypeAdapter [E ]
7
+ case class OptionTypeAdapter [E ](nullIsNone : Boolean , valueTypeAdapter : TypeAdapter [E ]) extends TypeAdapter [E ]
8
+ case class JavaOptionalTypeAdapter [E ](nullIsNone : Boolean , valueTypeAdapter : TypeAdapter [E ]) extends TypeAdapter [E ]
9
+
10
+ def typeAdapterOf (concreteType : RType ): TypeAdapter [_] = ???
11
+
12
+ @ main def test () = {
13
+ // https://github.com/gzoller/scalajack/blob/4a29366e28fbd594d7c21b4eb969ca14626ac0d1/core/src/main/scala/co.blocke.scalajack/typeadapter/TupleTypeAdapter.scala#L21-L30
14
+ val seq = List .empty[RType ]
15
+ seq map { f =>
16
+ typeAdapterOf(f) match {
17
+ case ota : OptionTypeAdapter [_] => ota.copy(nullIsNone = true )
18
+ case jota : JavaOptionalTypeAdapter [_] => jota.copy(nullIsNone = true )
19
+ case other => other
20
+ }
21
+ }
22
+ }
23
+
24
+ // 15154
You can’t perform that action at this time.
0 commit comments