Commit Graph

56 Commits

Author SHA1 Message Date
Kavon Farvardin
70266b589a NCGenerics: avoid UGT's in queries
An unbound generic type is not something that should end up in
`isNoncopyable` or `isEscapable` queries because there are no
conformances for such a type; it's unbound!

fixes test/Constraints/closures.swift
2024-02-06 08:15:26 -08:00
Slava Pestov
d7372396cb AST: Move TypeBase::isSendableType() to ConformanceLookup.cpp 2024-02-05 11:25:57 -05:00
Slava Pestov
d981cf3b77 Sema: De-requestify TypeBase::isNoncopyable() and TypeBase::isEscapable()
And consolidate the logic in ConformanceLookup.cpp.
2024-02-05 11:25:57 -05:00
Kavon Farvardin
b4985f7fde [NFC] replace canBeNoncopyable
First, "can have an absence of Copyable" is a rather confusing notion,
so the query is flipped to "can be Copyable". Next, it's more robust to
ask if a conformance exists for the TypeDecl to answer that question,
rather than trying to replicate what happens within that conformance
lookup.

Also renames `TypeDecl::isEscapable` to match.
2024-01-23 22:42:38 -08:00
Slava Pestov
9835a6f0ba AST: Assert that checkConformance() receives a fully-substituted type 2024-01-18 16:15:02 -05:00
Slava Pestov
f9e7181d46 AST: Split off ConformanceLookup.cpp from Module.cpp 2024-01-18 12:32:04 -05:00