Skip to content

Commit 3b44c95

Browse files
committed
Add custom args to pos tests
1 parent 94a2dff commit 3b44c95

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class CompilationTests {
4343
compileFilesInDir("tests/pos-scala2", scala2CompatMode),
4444
compileFilesInDir("tests/pos-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")),
4545
compileFilesInDir("tests/pos-custom-args/erased", defaultOptions.and("-language:experimental.erasedDefinitions")),
46+
compileFilesInDir("tests/pos-custom-args/quoted-pattern-poly", defaultOptions.and("-language:experimental.quotedPatternsWithPolymorphicFunctions")),
4647
compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init")),
4748
// Run tests for legacy lazy vals
4849
compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init", "-Ylegacy-lazy-vals", "-Ycheck-constraint-deps"), FileFilter.include(TestSources.posLazyValsAllowlist)),

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

+4
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)