void () { doTest( """ import java.util.regex.*; import java.util.Set; class Test { void test(Set<String> names) { try { names.forEach(Pattern::compile); } catch (PatternSyntaxException e) { throw new RuntimeException("Pattern error", e); } } } """); }