@Test public void testLeftRecursiveRuleRefWithArg() throws Exception {
		String grammar =
			"grammar T;\n" +
			"statement\n" +
			"locals[Scope scope]\n" +
			"    : expressionA[$scope] ';'\n" +
			"    ;\n" +
			"expressionA[Scope scope]\n" +
			"    : atom[$scope]\n" +
			"    | expressionA[$scope] '[' expressionA[$scope] ']'\n" +
			"    ;\n" +
			"atom[Scope scope]\n" +
			"    : 'dummy'\n" +
			"    ;\n";
		String expected =
			"error(" + ErrorType.NONCONFORMING_LR_RULE.code + "): T.g4:6:0: rule expressionA is left recursive but doesn't conform to a pattern ANTLR can handle\n";
		testErrors(new String[]{grammar, expected}, false);
	}
Reproduces https://github.com/antlr/antlr4/issues/855
tool-testsuite/test/org/antlr/v4/test/tool/TestLeftRecursionToolIssues.java