The invocation modifier "A.m" on line 8 breaks AST2 building. The modifier is parsed as a single Ident("A.m") and TypeHelper.getExprType (and probably Builder.refine_expr) don't handle this case when looking up the Ident (they just lookup A.m instead of m in A's scope). This is because the expected input for qualified identifiers is GetMember exprs but the grammar for invocation modifiers uses "identifierPath"
N.b: the inheritanceSpecifier, overrideSpecifier rules in src/solidity_parser/grammar/v08_22/SolidityParser.g4 also use identifierPath and might break in similar ways.
Remidation plan: change the grammar to accept "Expr" instead of identifierPath. This will make it accept more illegal solidity but we're not a compiler OR add a flag in AST2Builder to parse the Ident as a qualified path if required for this modifier case.
Parsed with 0.8.22
The invocation modifier "A.m" on line 8 breaks AST2 building. The modifier is parsed as a single Ident("A.m") and TypeHelper.getExprType (and probably Builder.refine_expr) don't handle this case when looking up the Ident (they just lookup A.m instead of m in A's scope). This is because the expected input for qualified identifiers is GetMember exprs but the grammar for invocation modifiers uses "identifierPath"
N.b: the inheritanceSpecifier, overrideSpecifier rules in src/solidity_parser/grammar/v08_22/SolidityParser.g4 also use identifierPath and might break in similar ways.
Remidation plan: change the grammar to accept "Expr" instead of identifierPath. This will make it accept more illegal solidity but we're not a compiler OR add a flag in AST2Builder to parse the Ident as a qualified path if required for this modifier case.