A single-field struct with an @_alignment attribute does not
have the same layout as its field.
This caused the runtime to compute incorrect layouts for
generic structs containing SIMD types.
Fixes <rdar://problem/33794343>.
At the cost of slight test readability, improve the diagnostics on test failure by pointing to the specific test case which failed on round-trip failure.
Currently `visitAssignExpr` always attempts to use type
derived from destination as a contextual type for assignment
source type-checking, which doesn't always lead to better
results.
Resolves: SR-5081
These tests depend on the specific characteristics of the memory allocator under
use. In particular, if the allocator decides to return a larger memory block
than requested, the tests may fail.
I can only make wild guesses as to why changes to String would cause this test
to fail on Linux, but that's what we're observing.
check failed at .../swift/validation-test/stdlib/Inputs/CommonArrayTests.gyb, line 159
8 >= 9
Substring's _persistentContent has a fast path that avoids a copy when
the Substring represents the entire outer String. It correctly
detected situations where the wrapped _StringCore was not itself a
slice, but was omitting the extra checks to make sure the Substring's
own range covered the entire String.
Test added.
This initializer, which is the same on iOS, allows negative values and
values > 1.0 to support the extended sRGB color space.
Fixes rdar://problem/33500905.
On initialization, IndexSet.RangeView made the erroneous assumption that given an intersection range, a nil _indexOfRange(containing: bound) indicated that the bound was beyond the beginning or end of the index set. Instead, the index could simply not exist.
We now calculate the actual intersection of the parent index set with the given intersection range and use that as the index set to view.
This also makes the unit tests for testing range views more comprehensive.
This is a step along the way toward handling backward-compatiblity of UTF8View
slicing and preventing inadvertent creation of String instances that keep
inaccessible memory alive.
In the type checker, we need to recognize when a member lookup succeeded through an IUO unwrap, and insert the implicit optional-unwrap component into the key path. In the standard library, we need to cope with the fact that IUO is still a first-class type with unique type metadata in a few places. Fix for rdar://problem/33230845.
This checks:
- The examples from the documentation of `reduce(_:_:)` and `reduce(into:_:)`.
- Different levels of inference in the closure arguments being passed.
- That the value passed as the `initialResult` remains unmodified.