Skip to content

Commit 5d6578d

Browse files
authored
Stabilize SIP-53 (quote pattern explicit type variable syntax) (#18574)
SIP-53: https://docs.scala-lang.org/sips/quote-pattern-type-variable-syntax.html Follow up of #17362 for 3.4
2 parents d32ce8a + e2b8890 commit 5d6578d

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@ trait QuotesAndSplices {
172172

173173
getQuotedPatternTypeVariable(tree.name.asTypeName) match
174174
case Some(typeSym) =>
175-
checkExperimentalFeature(
176-
"support for multiple references to the same type (without backticks) in quoted type patterns (SIP-53)",
177-
tree.srcPos,
178-
"\n\nSIP-53: https://docs.scala-lang.org/sips/quote-pattern-type-variable-syntax.html")
179175
warnOnInferredBounds(typeSym)
180176
ref(typeSym)
181177
case None =>
@@ -223,12 +219,6 @@ trait QuotesAndSplices {
223219
case LambdaTypeTree(_, body: TypeBoundsTree) => // ok
224220
case _ => report.error("Quote type variable definition cannot be an alias", tdef.srcPos)
225221

226-
if quoted.isType && untpdTypeVariables.nonEmpty then
227-
checkExperimentalFeature(
228-
"explicit type variable declarations quoted type patterns (SIP-53)",
229-
untpdTypeVariables.head.srcPos,
230-
"\n\nSIP-53: https://docs.scala-lang.org/sips/quote-pattern-type-variable-syntax.html")
231-
232222
if ctx.mode.is(Mode.InPatternAlternative) then
233223
for tpVar <- untpdTypeVariables do
234224
report.error(IllegalVariableInPatternAlternative(tpVar.name), tpVar.srcPos)

tests/neg/sip-53-exprimental-a.scala

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/neg/sip-53-exprimental-b.scala

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)