void () { String s = """ public class C implements I1, I2 { void f() { def a = 1; def int b = 2; } }"""; doTest(s, "class $name$", 1, 1); doTest(s, "class $name$ implements I1, I2", 1, 1); doTest(s, "class $name$ implements $interface$", 1, 0); doTest(s, "class '_T1 implements '_T2*", 1, 1); doTest(s, "class '_T1 implements '_T2+", 1, 1); doTest(s, "class $name$ implements I2, I1", 1, 0); doTest(s, "class C implements I1, I2 {}", 1, 0); doTest(s, "def a = 1;\n def b = 2;", 1, 0); doTest(s, "def a = 1\n def b = 2", 1, 0); }