From 00d4e98a6e9cac3f0eaa4eb970de9377a63cacef Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Mon, 15 May 2023 14:05:39 +0200 Subject: [PATCH] test: add in a regression test for #14271 [skip community_build] closes #14271 --- tests/pos/i14271.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/pos/i14271.scala diff --git a/tests/pos/i14271.scala b/tests/pos/i14271.scala new file mode 100644 index 000000000000..8f46940afd09 --- /dev/null +++ b/tests/pos/i14271.scala @@ -0,0 +1,14 @@ +// https://github.com/lampepfl/dotty/issues/14271 +class Bound[T] +class MyClass[T <: Bound[T]] + +class Container[V] { + def doSth(): V = ??? +} + +def bug() = { + val m = new Container[MyClass[_]] + if (true) { + m.doSth() + } +}