Commit Graph

2 Commits

Author SHA1 Message Date
Becca Royal-Gordon
31f99c2f55 Ignore generic context when module selector used
Normally, an unbound reference to a generic type within its own context is automatically bound to the identity generic arguments:

```
struct G<T> {
    typealias TA = G    // as if you wrote G<T>
}
```

Module selectors normally disable this kind of contextual behavior; make sure that this is not an exception.

To pipe the information needed to do this through the constraint solver, we extend FunctionRefInfo to remember whether a module selector was used.
2026-02-17 18:21:37 -08:00
Hamish Knight
73fb36f371 [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.
2024-12-02 14:11:33 +00:00