From 9fac52389f69aed787dc08ee67ee081fe58e033a Mon Sep 17 00:00:00 2001 From: Kacper Korban Date: Fri, 25 Oct 2024 10:48:56 +0200 Subject: [PATCH 1/3] fix: Allow `as` as an infix type in non context bound types --- tests/pos/i21769.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/pos/i21769.scala diff --git a/tests/pos/i21769.scala b/tests/pos/i21769.scala new file mode 100644 index 000000000000..ad4194d4217d --- /dev/null +++ b/tests/pos/i21769.scala @@ -0,0 +1,10 @@ + +infix trait as[From, To] + +val conv: (String as Int) = ??? +given instance: (String as Int) = ??? +def test(ev: (String as Int)) = ??? + +class F + +class K extends (F as K) From 0a85c7c8011d73885fae7d4f638fc8bd48959b25 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Fri, 14 Feb 2025 17:34:00 +0100 Subject: [PATCH 2/3] fix: Allow `as` as an infix type in non context bound types [Cherry-picked e7221c672030375a0bd2391befc6e1fb4938693e][modified] From 9fff8ac233479b30788f8cba2c6171289b0b6444 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Fri, 14 Feb 2025 17:36:16 +0100 Subject: [PATCH 3/3] Change inContextBound to a Boolean flag [Cherry-picked ae9cffa3a3c736103ca3bec2742b7fd7c2b930ac][modified]