Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize SIP-53 (quote pattern explicit type variable syntax) #18574

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading