@@ -29,8 +29,7 @@ private[scalatest] object TypeMatcherMacro {
29
29
// // Check that no type parameter is specified, if any does, give a friendly compiler warning.
30
30
def checkTypeParameter (refl : Reflection )(tree : refl.Term , methodName : String ): Unit = {
31
31
import refl ._
32
- implicit val toolbox : scala.quoted.Toolbox = scala.quoted.Toolbox .make(this .getClass.getClassLoader)
33
-
32
+
34
33
// TODO#Macros: Select lack unapply
35
34
/*
36
35
tree.underlyingArgument match {
@@ -52,8 +51,7 @@ private[scalatest] object TypeMatcherMacro {
52
51
// Do checking on type parameter and generate AST that create a 'a type' matcher
53
52
def aTypeMatcherImpl (aType : Expr [ResultOfATypeInvocation [_]])(implicit refl : Reflection ): Expr [Matcher [Any ]] = {
54
53
import refl ._
55
- implicit val toolbox : scala.quoted.Toolbox = scala.quoted.Toolbox .make(this .getClass.getClassLoader)
56
-
54
+
57
55
// check type parameter
58
56
checkTypeParameter(refl)(aType.unseal, " a" )
59
57
@@ -68,8 +66,7 @@ private[scalatest] object TypeMatcherMacro {
68
66
// Do checking on type parameter and generate AST that create a 'an type' matcher
69
67
def anTypeMatcherImpl (anType : Expr [ResultOfAnTypeInvocation [_]])(implicit refl : Reflection ): Expr [Matcher [Any ]] = {
70
68
import refl ._
71
- implicit val toolbox : scala.quoted.Toolbox = scala.quoted.Toolbox .make(this .getClass.getClassLoader)
72
-
69
+
73
70
// check type parameter
74
71
checkTypeParameter(refl)(anType.unseal, " an" )
75
72
@@ -84,8 +81,7 @@ private[scalatest] object TypeMatcherMacro {
84
81
// Do checking on type parameter and generate AST that create a negated 'a type' matcher
85
82
def notATypeMatcher (aType : Expr [ResultOfATypeInvocation [_]])(implicit refl : Reflection ): Expr [Matcher [Any ]] = {
86
83
import refl ._
87
- implicit val toolbox : scala.quoted.Toolbox = scala.quoted.Toolbox .make(this .getClass.getClassLoader)
88
-
84
+
89
85
// check type parameter
90
86
checkTypeParameter(refl)(aType.unseal, " a" )
91
87
@@ -100,8 +96,7 @@ private[scalatest] object TypeMatcherMacro {
100
96
// Do checking on type parameter and generate AST that create a negated 'an type' matcher
101
97
def notAnTypeMatcher (anType : Expr [ResultOfAnTypeInvocation [_]])(implicit refl : Reflection ): Expr [Matcher [Any ]] = {
102
98
import refl ._
103
- implicit val toolbox : scala.quoted.Toolbox = scala.quoted.Toolbox .make(this .getClass.getClassLoader)
104
-
99
+
105
100
// check type parameter
106
101
checkTypeParameter(refl)(anType.unseal, " an" )
107
102
@@ -116,8 +111,7 @@ private[scalatest] object TypeMatcherMacro {
116
111
// Do checking on type parameter and generate AST that does a 'and not' logical expression matcher for 'a type' matcher.
117
112
def andNotATypeMatcher [T : Type ](self : Expr [Matcher [T ]# AndNotWord ], aType : Expr [ResultOfATypeInvocation [_]])(implicit refl : Reflection ): Expr [Matcher [T ]] = {
118
113
import refl ._
119
- implicit val toolbox : scala.quoted.Toolbox = scala.quoted.Toolbox .make(this .getClass.getClassLoader)
120
-
114
+
121
115
// create a negated matcher from notATypeMatcher
122
116
val rhs = notATypeMatcher(aType)
123
117
@@ -132,8 +126,7 @@ private[scalatest] object TypeMatcherMacro {
132
126
// Do checking on type parameter and generate AST that does a 'and not' logical expression matcher for 'an type' matcher.
133
127
def andNotAnTypeMatcher [T : Type ](self : Expr [Matcher [T ]# AndNotWord ], anType : Expr [ResultOfAnTypeInvocation [_]])(implicit refl : Reflection ): Expr [Matcher [T ]] = {
134
128
import refl ._
135
- implicit val toolbox : scala.quoted.Toolbox = scala.quoted.Toolbox .make(this .getClass.getClassLoader)
136
-
129
+
137
130
// create a negated matcher from notAnTypeMatcher
138
131
val rhs = notAnTypeMatcher(anType)
139
132
@@ -148,8 +141,7 @@ private[scalatest] object TypeMatcherMacro {
148
141
// Do checking on type parameter and generate AST that does a 'or not' logical expression matcher for 'a type' matcher.
149
142
def orNotATypeMatcher [T : Type ](self : Expr [Matcher [T ]# OrNotWord ], aType : Expr [ResultOfATypeInvocation [_]])(implicit refl : Reflection ): Expr [Matcher [T ]] = {
150
143
import refl ._
151
- implicit val toolbox : scala.quoted.Toolbox = scala.quoted.Toolbox .make(this .getClass.getClassLoader)
152
-
144
+
153
145
// create a negated matcher from notATypeMatcher
154
146
val rhs = notATypeMatcher(aType)
155
147
@@ -164,8 +156,7 @@ private[scalatest] object TypeMatcherMacro {
164
156
// Do checking on type parameter and generate AST that does a 'or not' logical expression matcher for 'an type' matcher.
165
157
def orNotAnTypeMatcher [T : Type ](self : Expr [Matcher [T ]# OrNotWord ], anType : Expr [ResultOfAnTypeInvocation [_]])(implicit refl : Reflection ): Expr [Matcher [T ]] = {
166
158
import refl ._
167
- implicit val toolbox : scala.quoted.Toolbox = scala.quoted.Toolbox .make(this .getClass.getClassLoader)
168
-
159
+
169
160
// create a negated matcher from notAnTypeMatcher
170
161
val rhs = notAnTypeMatcher(anType)
171
162
0 commit comments