mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This introduces the required code completion callbacks which pass partially parsed TypeReprs to code completion. These types can refer to generic function parameters. Because we need to typecheck these types, we need to typecheck generic parameters first. Because exposing fine-grained typechecker interface just for code completion is bad, we create a function declaration based on the limited information we have (i.e., just the function name and generic parameters) and pass that to the typechecker. This approach (in theory) should work uniformly for function decls and nominal type decls, but the nominal type decl case is not tested yet. Eventually we will also want to use a similar approach for normal parser recovery as well. Swift SVN r7313
33 KiB
33 KiB