[AST] Split out "is compound" bit on FunctionRefInfo

FunctionRefKind was originally designed to represent
the handling needed for argument labels on function
references, in which the unapplied and compound cases
are effectively the same. However it has since been
adopted in a bunch of other places where the
spelling of the function reference is entirely
orthogonal to the application level.

Split out the application level from the
"is compound" bit. Should be NFC. I've left some
FIXMEs for non-NFC changes that I'll address in a
follow-up.
This commit is contained in:
Hamish Knight
2024-12-02 14:11:33 +00:00
parent a4d51419ba
commit 73fb36f371
25 changed files with 394 additions and 250 deletions

View File

@@ -101,7 +101,7 @@ TEST_F(SemaTest, TestKeypathFunctionConversionPrefersNarrowConversion) {
SourceLoc(), std::nullopt, false);
llvm::SmallVector<ValueDecl *, 2> fDecls = {genericFnDecl, concreteFnDecl};
auto *fDRE = new (Context) OverloadedDeclRefExpr(
fDecls, DeclNameLoc(), FunctionRefInfo::SingleApply, false);
fDecls, DeclNameLoc(), FunctionRefInfo::singleBaseNameApply(), false);
auto *callExpr = CallExpr::create(Context, fDRE, argList, false);
ConstraintSystem cs(DC, ConstraintSystemOptions());