mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This commit adds tracking of the reason a declaration reference is potentially unavailable to the UnavailableToOptionalExpr AST node and to OverloadChoice. We will use this reason during SILGen to emit the appropriate run-time check and during typechecking to provide more helpful diagnostics. To keep OverloadChoice as small as possible, we encode the reason as an index into a vector of reasons stored in a given instance of ConstraintSystem (this is the same approach that Fix takes). This commit adds Sema/OverloadChoice.cpp (for the parts of OverloadChoice that now rely on ConstraintSystem) and AST/Availability.h (to bring in availability-related structures without TypeRefinementContext). Swift SVN r22377
2.3 KiB
2.3 KiB