Slava Pestov
1323953219
Sema: Try not to make a negative impact
2024-10-08 16:14:05 -04:00
Slava Pestov
e47f9966ad
Sema: ConstraintSystem::openType() uses TypeTransform
2024-10-07 17:46:40 -04:00
Slava Pestov
4a82d384b7
Sema: Record synthesized conformances in the trail
2024-10-07 16:50:49 -04:00
Slava Pestov
12eb7cec26
Sema: Record implicit callAsFunction() roots in the trail
2024-10-07 16:50:49 -04:00
Slava Pestov
72a60728fc
Sema: Record argument lists in the trail
2024-10-07 16:50:49 -04:00
Slava Pestov
f2412f318e
Sema: Record key path expressions in the trail
2024-10-07 16:50:48 -04:00
Slava Pestov
881a0100b2
Sema: Record implicit value conversions in the trail
2024-10-07 16:50:48 -04:00
Slava Pestov
ac17292dfe
Sema: Record preconcurrency closures in the trail
2024-10-07 16:50:48 -04:00
Slava Pestov
b961a7ec51
Sema: Record isolated parameters in the trail
2024-10-07 16:50:48 -04:00
Slava Pestov
1d177d0187
Sema: Record expression patterns in the trail
2024-10-07 16:50:48 -04:00
Slava Pestov
500acd122a
Sema: Record potential throw sites in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
39d0eab275
Sema: Record case label items in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
8c8a385a4a
Sema: Record SyntacticElementTargetKeys in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
516277f0fd
Sema: Record contextual types in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
666361adf2
Sema: Record implied results in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
1d18cd07cf
Sema: Record closure types in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
43a4ac9216
Sema: Record resolved overloads in the trail
2024-10-07 16:50:46 -04:00
Slava Pestov
892e79cd70
Sema: Use an xmacro to clean up some duplication in CSTrail.cpp
2024-10-07 16:50:46 -04:00
Slava Pestov
6862955244
Sema: Record applied property wrappers in the trail
2024-10-07 16:50:46 -04:00
Slava Pestov
c7edc3494e
Sema: Record result builder transforms in the trail
2024-10-07 16:50:45 -04:00
Slava Pestov
64293ece51
Sema: Push reconciliation down into applySolution() to strengthen invariants
...
Now, we assert if you try to record the same change twice in any
other code path.
2024-10-07 16:50:45 -04:00
Slava Pestov
61575d9913
Sema: Remove a few isRecordingChanges() checks to tighten invariants
...
In these places we now assert if we attempt to record a change
during an active undo.
2024-10-07 16:50:45 -04:00
Slava Pestov
9115a46736
Sema: Record favored constraints in the trail
2024-10-07 16:50:45 -04:00
Slava Pestov
b2adf51d78
Sema: Record disabled constraints in the trail
2024-10-07 16:50:45 -04:00
Slava Pestov
411c590bc8
Sema: Record key path component types in the trail
2024-10-07 16:50:44 -04:00
Slava Pestov
7ea975015f
Sema: Record ASTNode types in the trail
2024-10-07 16:50:44 -04:00
Slava Pestov
3dc16a9f5b
Sema: Record defaulted constraints in the trail
2024-10-01 18:10:20 -04:00
Slava Pestov
fcd6bc04fd
Sema: Remove Solution::PackElementGenericEnvironments
2024-10-01 18:10:20 -04:00
Slava Pestov
0518b762d1
Sema: Record pack environments in the trail
2024-10-01 18:10:20 -04:00
Slava Pestov
f51bf3cf9d
Sema: Record pack expansion environments in the trail
2024-10-01 18:10:20 -04:00
Slava Pestov
9afb1a960b
Sema: Record opened pack expansion types in the trail
2024-10-01 18:10:20 -04:00
Slava Pestov
7d3350d0f2
Sema: Record opened existential types in the trail
2024-10-01 18:10:19 -04:00
Slava Pestov
f963f36a16
Sema: Record opened types in the trail
2024-10-01 18:10:19 -04:00
Slava Pestov
a9f392278f
Sema: Record argument matching choices in the trail
2024-10-01 18:10:18 -04:00
Slava Pestov
8b4a58fb02
Sema: Record applied disjunctions in the trail
2024-10-01 18:10:18 -04:00
Slava Pestov
8799596bed
Sema: Record disjunction choices in the trail
2024-10-01 18:10:18 -04:00
Slava Pestov
49487b8893
Sema: Record fixed requirements in the trail
2024-10-01 18:10:17 -04:00
Slava Pestov
df692edc7c
Sema: Record fixes in the trail
2024-10-01 12:34:41 -04:00
Slava Pestov
62a470e3d5
Sema: Record conversion restrictions in the trail
2024-10-01 12:34:41 -04:00
Slava Pestov
c0afe3fce1
Sema: Don't create new ConstraintGraphNode during active undo
...
This messes up the bookkeeping for the trail.
2024-09-27 10:51:47 -04:00
Slava Pestov
105b6b39a9
Sema: Remove ConstraintGraphScope
2024-09-26 23:15:27 -04:00
Slava Pestov
8ee4eeee55
Sema: Migrate SavedTypeVariableBindings to SolverTrail
2024-09-26 23:15:27 -04:00
Slava Pestov
4cc27c9b20
Sema: Factor out SolverTrail from ConstraintGraph
2024-09-26 23:15:26 -04:00
Kavon Farvardin
df73eecdeb
Sema: generalize findSyntacticErrorForConsume
...
Since this function is being called from the constraint solver now, we
need to generalize the way it obtains the Type of an Expression, as the
expression itself may not know its own type, only the solver does.
resolves rdar://134371893 / https://github.com/swiftlang/swift/issues/75999
2024-09-24 13:59:29 -07:00
Hamish Knight
1cc00e3676
[CS] NFC: Remove SolutionApplicationToFunctionResult
...
This is now no longer needed.
2024-09-17 12:35:11 +01:00
Hamish Knight
930dc18eb7
[CS] Avoid delaying application for multi-statement closures
...
We ought to be able to apply the solution to them
immediately now.
2024-09-17 12:35:11 +01:00
Hamish Knight
f0151c1d21
[CS] Delay type-checking of local decls
...
Delay `typeCheckDecl` for local decls until the
end of CSApply. This replaces the existing logic
for delaying type-checking for local functions.
2024-09-17 12:35:10 +01:00
Hamish Knight
d99d881af5
[CS] NFC: Factor out base class SyntacticElementTargetRewriter
...
Pass this instead of a function for rewriting
targets.
2024-09-17 12:35:10 +01:00
Allan Shortlidge
58a77206c4
ConstraintSystem: Remove UnviableReason::UR_MissingImport.
...
Now that `MemberImportVisibility` behavior is implemented using ranking there
is no need to support the `UR_MissingImport` unviability reason.
2024-09-10 09:47:42 -07:00
Allan Shortlidge
c868378d96
ConstraintSystem: Use scoring to implement MemberImportVisibility.
...
Previously, the constraint solver would first attempt member lookup that
excluded members from transitively imported modules. If there were no viable
candidates, it would perform a second lookup that included the previously
excluded members, treating any candidates as unviable. This meant that if the
member reference did resolve to one of the unviable candidates the resulting
AST would be broken, which could cause unwanted knock-on diagnostics.
Now, members from transitively imported modules are always returned in the set
of viable candidates. However, scoring will always prioritize candidates from
directly imported modules over members from transitive imports. This solves the
ambiguities that `MemberImportVisibility` is designed to prevent. If the only
viable candidates are from transitively imported modules, though, then the
reference will be resolved successfully and diagnosed later in
`MiscDiagnostics.cpp`. The resulting AST will not contain any errors, which
ensures that necessary access levels can be computed correctly for the imports
suggested by `MemberImportVisibility` fix-its.
Resolves rdar://126637855.
2024-09-10 09:47:42 -07:00