Skip to content

Commit 967e04a

Browse files
committed
Add custom args to pos tests
1 parent a6b207d commit 967e04a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class CompilationTests {
3838
compileFilesInDir("tests/pos-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")),
3939
compileFile("tests/pos-special/utf8encoded.scala", defaultOptions.and("-encoding", "UTF8")),
4040
compileFile("tests/pos-special/utf16encoded.scala", defaultOptions.and("-encoding", "UTF16")),
41+
compileFilesInDir("tests/pos-custom-args/quoted-pattern-poly", defaultOptions.and("-language:experimental.quotedPatternsWithPolymorphicFunctions")),
4142
// Run tests for legacy lazy vals
4243
compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init", "-Ylegacy-lazy-vals", "-Ycheck-constraint-deps"), FileFilter.include(TestSources.posLazyValsAllowlist)),
4344
compileDir("tests/pos-special/java-param-names", defaultOptions.withJavacOnlyOptions("-parameters")),

tests/pos-macros/hoas-patten-with-type-params.scala renamed to tests/pos-custom-args/quoted-pattern-poly/quoted-patten-with-type-params.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import scala.quoted.*
22

33
def test(body: Expr[Any])(using Quotes): Expr[String] =
44
body match
5+
case '{ [A] => (x : A, y : A) => (x, y) } => ???
6+
// Bounded type parameters are allowed when they are not used in
7+
// higher-order patterns
8+
case '{ [A <: Iterable[Int]] => (x : A) => x } => ???
59
case '{ [A] => (x : A, y : A) => $b[A](x, y) : A } =>
610
'{ $b[String]("truthy", "falsy") }
711
case '{ [A, B] => (x : A, f : A => B) => $b[A, B](x, f) : B} =>

0 commit comments

Comments
 (0)