Extended test for #1937 with switch expressions
Extended fix for #1937 with support for switch expressions