Add test for #20894
This adds a test for #20894 (closed). Should be backported to the ghc-9.2
branch in tandem with the commit 6acadb79 which fixes it.
This adds a test for #20894 (closed). Should be backported to the ghc-9.2
branch in tandem with the commit 6acadb79 which fixes it.