File tree 2 files changed +4
-8
lines changed
tests/run-with-compiler/i5941
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -203,10 +203,6 @@ object Prism {
203
203
def impl [S : Type , A <: S : Type ](implicit refl : Reflection ): Expr [Prism [S , A ]] = {
204
204
import refl ._
205
205
import util ._
206
- import quoted .Toolbox .Default ._
207
-
208
- val tpS = typeOf[S ]
209
- val tpA = typeOf[A ]
210
206
211
207
' {
212
208
val get = (p : S ) => if (p.isInstanceOf [A ]) Some (p.asInstanceOf [A ]) else None
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ object Test {
24
24
assert(len2.get(employee2) == 5 )
25
25
26
26
// prism
27
- // val jStr: Prism[Json, JStr] = GenPrism[Json, JStr]
28
- // assert(jStr.getOption(JNum(4.5)) == None)
29
- // assert(jStr.getOption(JStr("hello")) == Some(JStr("hello")))
30
- // assert(jStr(JStr("world")) == JStr("world"))
27
+ val jStr : Prism [Json , JStr ] = GenPrism [Json , JStr ]
28
+ assert(jStr.getOption(JNum (4.5 )) == None )
29
+ assert(jStr.getOption(JStr (" hello" )) == Some (JStr (" hello" )))
30
+ assert(jStr(JStr (" world" )) == JStr (" world" ))
31
31
32
32
assert(GenIso [JStr , String ].to(JStr (" Hello" )) == " Hello" )
33
33
assert(GenIso .unit[JNull .type ].to(JNull ) == 1 )
You can’t perform that action at this time.
0 commit comments