Commit Graph

7544 Commits

Author SHA1 Message Date
Alexander Cyon
4a2942bb4e Fix typos in: cmake, tools, utils, unittests, validation-test
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2024-07-12 02:34:00 +03:00
swift-ci
ff7df3d30d Merge remote-tracking branch 'origin/main' into rebranch 2024-07-08 07:14:02 -07:00
Nate Cook
6d4f4a45cf Improve RangeSet union performance (#74963) 2024-07-08 09:00:37 -05:00
swift-ci
ce603fc5d0 Merge remote-tracking branch 'origin/main' into rebranch 2024-07-03 20:35:18 -07:00
Kavon Farvardin
ed0413d34d Merge pull request #74863 from kavon/re-enable-test
Revert "Disable test Runtime/issue-51181.swift"
2024-07-03 20:30:46 -07:00
swift-ci
68104b36eb Merge remote-tracking branch 'origin/main' into rebranch 2024-07-01 20:14:04 -07:00
Slava Pestov
7a8a56254a AST: Fix substitution map composition edge case
Adding `T == Int` to

    G1 := <T where T: Equatable>

gives us

    G2 := <T where T == Int>

which means that if I have this substitution map for G2:

    S2 := { Int }

then `SubstitutionMap::get(G1, S2)` should give me this substitution map
for G1:

    S2 := { Int, [Int: Equatable] }

But it didn't, instead returning a substitution map with an invalid
conformance.

The problem is that local conformance lookup alone cannot recover
`[Int: Equatable]` in this case, because there is no "concrete
conformance requirement" `[T == Int: Equatable]` recorded anywhere
in G2.

This is of course a legacy of the GenericSignatureBuilder. It would have
been better to not drop conformance requirements made concrete. But oh
well.

Fixes https://github.com/swiftlang/swift/issues/74465
Fixes rdar://130404629.
2024-07-01 14:15:41 -04:00
Kavon Farvardin
6e1bd47d61 Revert "Disable test Runtime/issue-51181.swift"
This reverts commit dfcdf16a72.
2024-07-01 09:15:07 -07:00
Xi Ge
736ccef626 Merge remote-tracking branch 'apple/main' into rebranch 2024-06-20 15:16:55 -07:00
Hamish Knight
23a85d19ed Merge pull request #74387 from hamishknight/pattern-resolution
[Sema] Requestify pattern resolution
2024-06-20 21:07:07 +01:00
swift-ci
34ed720427 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-18 22:34:46 -07:00
Greg Titus
a3ab8bbe70 Merge pull request #74540 from gregomni/issue-46000
[Sema] Remove external dependencies and move test from validation_test to test.
2024-06-18 22:29:50 -07:00
Greg Titus
18392fd576 Remove external dependencies and move from validation_test to test. 2024-06-18 19:01:08 -07:00
swift-ci
534620ceef Merge remote-tracking branch 'origin/main' into rebranch 2024-06-18 14:15:39 -07:00
Slava Pestov
cb1605f26f Merge pull request #74414 from slavapestov/pack-element-var
SIL: Fix lowering for 'var's whose types contain local archetypes
2024-06-18 17:14:50 -04:00
Slava Pestov
e4d6108e11 SIL: Fix lowering for 'var's whose types contain local archetypes
A mutable 'var' becomes a SILBoxType, and we need to plumb the
correct generic signature through here too.

Fixes https://github.com/apple/swift/issues/71921.
2024-06-18 11:45:41 -04:00
swift-ci
0bbe4a8055 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-17 10:14:25 -07:00
Greg Titus
fd6197fe16 Merge pull request #74453 from gregomni/issue-46000
[Sema] Add validation test for issue #46000
2024-06-16 00:01:39 -07:00
Greg Titus
56f0958898 Add validation test for issue #46000 2024-06-15 21:01:31 -07:00
swift-ci
22cb67eb1a Merge remote-tracking branch 'origin/main' into rebranch 2024-06-13 18:14:27 -07:00
Kavon Farvardin
4b374cdb0e Merge pull request #74400 from kavon/rdar125659789-nfcs
NFC: simplify test and add assertion
2024-06-13 18:13:11 -07:00
Kavon Farvardin
e4ed330077 NFC: simplify test and add assertion
This is a follow-up to clean-up https://github.com/apple/swift/pull/74372
2024-06-13 11:58:21 -07:00
Hamish Knight
26e8245e22 [Sema] Requestify pattern resolution
Add a cached request to perform pattern resolution.
This is needed to prevent the constraint system
from resolving the same pattern multiple times
along different solver paths, which could result
in creating different pattern nodes for each path.
Once pattern resolution is moved to pre-checking
we ought to be able to make this uncached.

rdar://128661960
2024-06-13 15:27:47 +01:00
swift-ci
eec81cb15e Merge remote-tracking branch 'origin/main' into rebranch 2024-06-13 06:34:21 -07:00
Kavon Farvardin
4517333b8e Merge pull request #74372 from kavon/rdar125659789 2024-06-13 06:27:58 -07:00
swift-ci
c7002b524a Merge remote-tracking branch 'origin/main' into rebranch 2024-06-12 22:14:25 -07:00
Kavon Farvardin
9eba052ab2 Merge pull request #74322 from kavon/se427-noimplicit-for-invertible
SE-427: Make conditional conformances to Copyable more explicit.
2024-06-12 22:03:49 -07:00
swift-ci
0feba89180 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-12 21:34:02 -07:00
nate-chandler
a83269ebd1 Merge pull request #74361 from nate-chandler/gh69252
[Test] Add regression test.
2024-06-12 21:21:36 -07:00
Kavon Farvardin
273549239b AST: fix isWrittenWithConstraints
Surprisingly, there are some situations where an extension can end up
with _fewer_ constraints than the extended type. That was baked-in as an
assertion in this new-ish method.

I haven't figured out why that can happen in the reproducer only when
using `-interpret` mode. It didn't trigger the assertion for me when
compiling normally.

The fix is simple: check all the requirements, rather than using a
short-cut.

resolves rdar://125659789 / https://github.com/apple/swift/issues/72719
2024-06-12 17:20:49 -07:00
Kavon Farvardin
a1e14ae0c7 Sema: ext's must add solo invertible conformances
This helps prevent confusion after not inferring requirements if the
extension adds a Copyable conformance.
2024-06-12 14:44:22 -07:00
Nate Chandler
b1c7999361 [Test] Add regression test.
For https://github.com/apple/swift/issues/69252 .
2024-06-12 14:10:05 -07:00
swift-ci
114a5af0b6 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-12 00:14:27 -07:00
nate-chandler
689e889297 Merge pull request #74318 from nate-chandler/gh72615
[Test] Add regression test.
2024-06-12 00:13:45 -07:00
swift-ci
3328274e09 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-11 21:34:22 -07:00
Nate Chandler
562e724bbd [Test] Add regression test.
For https://github.com/apple/swift/issues/72615 .
2024-06-11 17:43:18 -07:00
Nate Chandler
d895c34c70 [Test] Add regression test. 2024-06-11 14:57:23 -07:00
swift-ci
b095ea9e1f Merge remote-tracking branch 'origin/main' into rebranch 2024-06-07 14:54:59 -07:00
Nate Chandler
2436353377 [Test] Add regression test.
Fix is in https://github.com/apple/swift/pull/74157 .

rdar://129010265
2024-06-07 07:27:32 -07:00
swift-ci
cee457eb46 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-07 06:54:37 -07:00
nate-chandler
033fc2354f Merge pull request #74157 from nate-chandler/rdar128710064
[SILGen] Store_borrow into in_guaranteed.
2024-06-07 06:47:16 -07:00
swift-ci
749cc49ed1 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-06 15:54:11 -07:00
Nate Chandler
c35b86a30d [SILGen] Borrow into in_guaranteed.
Don't create a copy in order to pass a value `@in_guaranteed`.  Just
`store_borrow` the value.

rdar://128710064
2024-06-06 15:45:22 -07:00
Alejandro Alonso
73b0ad3622 Merge pull request #74122 from Azoy/dict-builder-condition
[stdlib] Guard for empty singleton in dictionary builder
2024-06-06 15:36:31 -07:00
Alejandro Alonso
1cda063fe0 Update Dictionary.swift 2024-06-06 11:02:47 -07:00
swift-ci
5963c949e1 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-06 07:35:19 -07:00
Tim Kientzle
6c2b772b86 Merge pull request #74145 from tbkka/tbkka-remotemirror-mpe-fixes
Expand the work from #73491 to support more MPE layouts.
2024-06-06 07:31:20 -07:00
swift-ci
a25693a194 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-05 23:36:22 -07:00
nate-chandler
c961cc1662 Merge pull request #74140 from nate-chandler/gh68128
[Test] Add regression test.
2024-06-05 23:26:32 -07:00
swift-ci
acb84b4fd0 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-05 19:54:38 -07:00