[flang] Fix crash on structure constructor as selector
In something like "ASSOCIATE(X=>T(1))", the "T(1)" is parsed as a Variable because it looks like a function reference or array reference; if it turns out to be a structure constructor, which is something we can't know until we're able to attempt generic interface resolution in semantics, the parse tree needs to be fixed up by replacing the Variable with an Expr. The compiler could already do this for putative function references encapsulated as Exprs, so this patch moves some code around and adds parser::Selector to the overloads of expression analysis. Differential Revision: https://reviews.llvm.org/D103572
Loading
Please sign in to comment