From 62c71c08d5264a1fb9b8eae66c3a76ffa05c1628 Mon Sep 17 00:00:00 2001 From: odersky Date: Thu, 25 Jul 2024 17:24:21 +0200 Subject: [PATCH] Fix tests --- tests/neg/i13580.check | 4 ++++ tests/pos/i13580.scala | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 tests/neg/i13580.check diff --git a/tests/neg/i13580.check b/tests/neg/i13580.check new file mode 100644 index 000000000000..8f91bcf9bde5 --- /dev/null +++ b/tests/neg/i13580.check @@ -0,0 +1,4 @@ +-- Error: tests/neg/i13580.scala:9:7 ----------------------------------------------------------------------------------- +9 |given (using tracked val w: IntWidth) => IntCandidate: // error + | ^^^^^ + | `using` is already implied here, should not be given explicitly diff --git a/tests/pos/i13580.scala b/tests/pos/i13580.scala index b9b3a00392a0..60e971610209 100644 --- a/tests/pos/i13580.scala +++ b/tests/pos/i13580.scala @@ -1,12 +1,12 @@ //> using options -language:experimental.modularity -source future trait IntWidth: type Out -given IntWidth with +given IntWidth: type Out = 155 trait IntCandidate: type Out -given (using tracked val w: IntWidth): IntCandidate with +given (tracked val w: IntWidth) => IntCandidate: type Out = w.Out val x = summon[IntCandidate]