You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A number of examples on the main site do not compile. Some appear to lack necessary import statements; others do not work in the currently released version of Swift.
The first example, under "Fast," crashes the compiler for at least one user, and produces the following compiler diagnostics for me in the REPL:
˄˜˜˜ ˄
│ ╰─ error: generic parameter 'Scalar' could not be inferred
│ ╰─ note: explicitly specify the generic arguments to fix this issue
╰─ error: cannot find type 'Span' in scope
Desktop (please complete the following information):
OS: macOS Sequoia 15.5
Apple Swift version 6.1 (swift-6.1-RELEASE)
If possible, minimal yet complete reproducer code (or link to code)
// Vectorized check that a utf8 buffer is all ASCII
func isASCII(utf8:Span<SIMD16<UInt8>>)->Bool{
// combine all the code units into a single entry
utf8.indices.reduce(into:SIMD16()){
// fold each set of code units into the result
$0 |=utf8[$1]}
// check that every entry is in the ASCII range
.max()<0x80}
Swift.org version/commit hash
(?)
Additional context
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
A number of examples on the main site do not compile. Some appear to lack necessary
import
statements; others do not work in the currently released version of Swift.The first example, under "Fast," crashes the compiler for at least one user, and produces the following compiler diagnostics for me in the REPL:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Code should compile successfully.
Actual behavior
Code does not compile successfully.
Environment details
Desktop (please complete the following information):
If possible, minimal yet complete reproducer code (or link to code)
Swift.org version/commit hash
(?)
Additional context
The text was updated successfully, but these errors were encountered: