File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
scalactic.dotty/src/main/scala/org/scalactic
scalatest.dotty/src/main/scala/org/scalatest/diagrams Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ object BooleanMacro {
43
43
44
44
def exprStr : String = condition.show
45
45
def defaultCase = ' { Bool .simpleMacroBool($condition, $ {Expr (exprStr)}, $prettifier) }
46
- def isImplicitMethodType (tp : Type ): Boolean =
47
- IsMethodType .unapply(tp).flatMap(tp => if tp.isImplicit then Some (true ) else None ).nonEmpty
46
+ def isImplicitMethodType (tp : Type ): Boolean = tp match {
47
+ case IsMethodType (tp) => tp.isImplicit
48
+ case _ => false
49
+ }
48
50
49
51
def isByNameMethodType (tp : Type ): Boolean = tp.widen match {
50
52
case MethodType (_, ByNameType (_) :: Nil , _) => true
Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ object DiagramsMacro {
32
32
33
33
def isXmlSugar (apply : Apply ): Boolean = apply.tpe <:< typeOf[scala.xml.Elem ]
34
34
def isJavaStatic (tree : Tree ): Boolean = tree.symbol.flags.is(Flags .Static )
35
- def isImplicitMethodType (tp : Type ): Boolean =
36
- IsMethodType .unapply(tp).flatMap(tp => if tp.isImplicit then Some (true ) else None ).nonEmpty
35
+ def isImplicitMethodType (tp : Type ): Boolean = tp match {
36
+ case IsMethodType (tp) => tp.isImplicit
37
+ case _ => false
38
+ }
37
39
38
40
def selectField (o : Term , name : String ): Term = Select .unique(o, name)
39
41
You can’t perform that action at this time.
0 commit comments