- Don't attempt to insert fixes if there are restrictions present, they'd inform the failures.
Inserting fixes too early doesn't help the solver because restriction matching logic would
record the same fixes.
- Adjust impact of the fixes.
Optional conversions shouldn't impact the score in any way because
they are not the source of the issue.
- Look through one level of optional when failure is related to optional injection.
The diagnostic is going to be about underlying type, so there is no reason to print
optional on right-hand side.
This test stops working with deployment targets that no longer link
@rpath/libswiftCoreGraphics.dylib when running on OSes that still
require the CoreGraphics overlay. Explicitly link it to workaround.
rdar://135451615
Fields containing metatypes with no possible subtypes are thin i.e. they have no storage. There is only one possible value they can have: the corresponding type. Mirror attempted to copy the nonexistent field value from the nonexistent storage, producing garbage. Instead, special-case thin metatypes and copy the instance type out of the metatype metadata rather than trying to copy it from the field.
rdar://108280543
This test stops working with deployment targets that no longer link
@rpath/libswiftCoreGraphics.dylib when running on OSes that still
require the CoreGraphics overlay. Explicitly link it to workaround.
Only constrain the availability of the synthesized typealias for an inferred
type witness by the availability of the associated type if the associated type
is less available than its protocol. Without this, source compatibility is
broken for some conformances. For example:
```
struct IdentifiableValue: Identifiable {
let id = 42
}
extension IdentifiableValue {
// error: 'ID' is only available in macOS 10.15 or newer
var nextID: ID {
return id + 1
}
}
```
Fixes a regression introduced by https://github.com/swiftlang/swift/pull/71496.
Resolves rdar://134584323
This patch adds an apinotes file for SwiftWASILibc clang module to mark
`errno` macro hidden from Swift code. This resolves ambiguity between
the C macro definition and the Swift wrapper in WASILibc overlay module.
This change installs the apinotes file to the resource directories for
both lib/swift/apinotes and lib/swift_static/apinotes.
Testing the old behaviour can cause issues when the new availability
gets properly defined. Just check the new behaviour, which is what we
are doing in other stdlib tests.
The legacy `module.map` spelling of module map files was deprecated by llvm/llvm-project#75142 and clang expects to remove support for them in the future. Switch all tests to use the supported spelling.
Fixes rdar://128431478.
Some editors use diagnostics from SourceKit to replace build issues. This causes issues if the diagnostics from SourceKit are formatted differently than the build issues. Make sure they are rendered the same way, removing most uses of `DiagnosticsEditorMode`.
To do so, always emit the `add stubs for conformance` note (which previously was only emitted in editor mode) and remove all `; add <something>` suffixes from notes that state which requirements are missing.
rdar://129283608
It's not obvious that we can check that hash/equality behavior
is entirely correct, since there are two very different behaviors
which depend on environmental factors that are not easy to test for.
But we can do a quick probe to see whether the current environment
seems to be offering the legacy or non-legacy behavior and then
carefully verify that everything else is consistent with our initial
probe.
This gives us confidence that at least we're not getting inconsistent
behavior.
The underlying behavior of __SwiftValue bridging now has
a couple of different possible behaviors depending on how
libswiftCore was built and even (in some cases) the specific binary that's
running.
This makes it very hard to craft an accurate test of this functionality.
Disable it (for now) until we can figure out a better way to
conditionalize the expected behavior here.
There are conformers to SIMDStorage (like that in the added test case)
which involve an Array (a type that can't conform to BitwiseCopyable).
So lift the constraint on SIMDStorage. This in turn requires lifting
the constraint on SIMD (otherwise, e.g. `SIMD8<Scalar>` would fail to
conform since it has as a member some SIMD8Storage which is only
constrained to conform to `SIMDStorage`; the `SIMD8Storage`
associatedtype also cannot be constrained to `BitwiseCopyable` because
that storage may again not conform as in the test example).
rdar://128661878