Skip to content

Commit

Permalink
Stabilize SIP-53 (quote pattern explicit type variable syntax) (#18574)
Browse files Browse the repository at this point in the history
  • Loading branch information
smarter authored Oct 6, 2023
2 parents d32ce8a + e2b8890 commit 5d6578d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
10 changes: 0 additions & 10 deletions compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ trait QuotesAndSplices {

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

if quoted.isType && untpdTypeVariables.nonEmpty then
checkExperimentalFeature(
"explicit type variable declarations quoted type patterns (SIP-53)",
untpdTypeVariables.head.srcPos,
"\n\nSIP-53: https://docs.scala-lang.org/sips/quote-pattern-type-variable-syntax.html")

if ctx.mode.is(Mode.InPatternAlternative) then
for tpVar <- untpdTypeVariables do
report.error(IllegalVariableInPatternAlternative(tpVar.name), tpVar.srcPos)
Expand Down
11 changes: 0 additions & 11 deletions tests/neg/sip-53-exprimental-a.scala

This file was deleted.

10 changes: 0 additions & 10 deletions tests/neg/sip-53-exprimental-b.scala

This file was deleted.

0 comments on commit 5d6578d

Please sign in to comment.