Skip to content

Commit e6ad313

Browse files
committed
Cleanup code
1 parent 9b1c0f5 commit e6ad313

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

tests/run-with-compiler/i5941/macro_1.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,6 @@ object Prism {
203203
def impl[S: Type, A <: S : Type](implicit refl: Reflection): Expr[Prism[S, A]] = {
204204
import refl._
205205
import util._
206-
import quoted.Toolbox.Default._
207-
208-
val tpS = typeOf[S]
209-
val tpA = typeOf[A]
210206

211207
'{
212208
val get = (p: S) => if (p.isInstanceOf[A]) Some(p.asInstanceOf[A]) else None

tests/run-with-compiler/i5941/usage_2.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ object Test {
2424
assert(len2.get(employee2) == 5)
2525

2626
// 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"))
3131

3232
assert(GenIso[JStr, String].to(JStr("Hello")) == "Hello")
3333
assert(GenIso.unit[JNull.type].to(JNull) == 1)

0 commit comments

Comments
 (0)