swift
a0f506a3 - Use the closure type during type checking for establishing use of new features

Commit
3 years ago
Use the closure type during type checking for establishing use of new features When evaluating whether code is within a closure that uses concurrency features, use the type of the closure as it's known during type checking, so that contextual information (e.g., it's passed to a `@Sendable` or `async` parameter of function type) can affect the result. This corrects the definition for doing strict checking within a minimal context for the end result of the type-check, rather than it's initial state, catching more issues. Fixes SR-15131 / rdar://problem/82535088. (cherry picked from commit cc7904cf52dc0fa01518bff053919eec35bcea10)
Author
Committer
Parents
  • include/swift/Sema
    • File
      ConstraintSystem.h
  • lib/Sema
    • File
      CSSimplify.cpp
    • File
      ConstraintSystem.cpp
    • File
      TypeCheckConcurrency.cpp
    • File
      TypeCheckConcurrency.h
  • test/Concurrency
    • File
      global_actor_from_ordinary_context.swift