@@ -122,9 +122,6 @@ trait QuotesAndSplices {
122
122
val typedTypeargs = tree.typeargs.map {
123
123
case typearg : untpd.Ident =>
124
124
val typedTypearg = typedType(typearg)
125
- /* TODO-18271: Allow type bounds?
126
- * (NOTE: Needs non-trivial extension to type system)
127
- */
128
125
val bounds = ctx.gadt.fullBounds(typedTypearg.symbol)
129
126
if bounds != null && bounds != TypeBounds .empty then
130
127
report.error(" Implementation restriction: Type arguments to Open pattern are expected to have no bounds" , typearg.srcPos)
@@ -179,17 +176,14 @@ trait QuotesAndSplices {
179
176
/** Types a splice applied to some type arguments and arguments
180
177
* `$f[targs1, ..., targsn](arg1, ..., argn)` in a quote pattern.
181
178
*
182
- * TODO-18217: Remove follwing notes on complete
183
- * Refer to: typedTypeApply
179
+ * Refer to: typedAppliedSplice
184
180
*/
185
181
def typedAppliedSpliceWithTypes (tree : untpd.Apply , pt : Type )(using Context ): Tree = {
186
182
assert(ctx.mode.isQuotedPattern)
187
183
val untpd .Apply (typeApplyTree @ untpd.TypeApply (splice : untpd.SplicePattern , typeargs), args) = tree : @ unchecked
188
184
def isInBraces : Boolean = splice.span.end != splice.body.span.end
189
185
if isInBraces then // ${x}[...](...) match an application
190
- // TODO-18127: typedTypeApply cares about named arguments. Do we want to care as well?
191
186
val typedTypeargs = typeargs.map(arg => typedType(arg))
192
- // TODO-18217: Why do we use typedExpr here?
193
187
val typedArgs = args.map(arg => typedExpr(arg))
194
188
val argTypes = typedArgs.map(_.tpe.widenTermRefExpr)
195
189
val splice1 = typedSplicePattern(splice, ProtoTypes .PolyProto (typedArgs, defn.FunctionOf (argTypes, pt)))
@@ -198,7 +192,6 @@ trait QuotesAndSplices {
198
192
else // $x[...](...) higher-order quasipattern
199
193
// Empty args is allowed
200
194
if typeargs.isEmpty then
201
- // TODO-18271: Better error message
202
195
report.error(" Missing type arguments for open pattern" , tree.srcPos)
203
196
typedSplicePattern(untpd.cpy.SplicePattern (tree)(splice.body, typeargs, args), pt)
204
197
}
0 commit comments