Test case for #11699 in typecheck/should_compile