From 78b361330c0db8921c03105334f1d1ee4583c0a5 Mon Sep 17 00:00:00 2001 From: Yichen Xu Date: Sun, 5 Nov 2023 01:35:33 +0100 Subject: [PATCH] Capture check Channel.scala --- tests/pos-special/stdlib/concurrent/Channel.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/pos-special/stdlib/concurrent/Channel.scala b/tests/pos-special/stdlib/concurrent/Channel.scala index 66feb4d7083b..17e735d561c7 100644 --- a/tests/pos-special/stdlib/concurrent/Channel.scala +++ b/tests/pos-special/stdlib/concurrent/Channel.scala @@ -12,13 +12,15 @@ package scala.concurrent +import language.experimental.captureChecking + /** This class provides a simple FIFO queue of data objects, * which are read by one or more reader threads. * * @tparam A type of data exchanged */ @deprecated("Use `java.util.concurrent.LinkedTransferQueue` instead.", since = "2.13.0") -class Channel[A] { +class Channel[sealed A] { private class LinkedList { var elem: A = _ var next: LinkedList = _