[SR-10461] Unable to type check expression, Xcode 10.2 regression #52861
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
performance
regression
swift 5.0
type checker
Area → compiler: Semantic analysis
Environment
macOS 10.14.4, Xcode 10.2 default toolchain and most recent dev (snapshot 2019-04-10).
Additional Detail from JIRA
md5: 7ec31f46de8374f0ac7b8e482cbd440f
relates to:
Issue Description:
I know for certain that the three lines with i, j and k in test.swift did type check (quickly) prior to upgrading to Xcode 10.2 and macOS 10.14.4. But the compiler is now unable to type check them.
test.swift:
test.swift doesn't compile, although I know it did before I upgraded to Xcode 10.2 and macOS 10.14.4:
A naive workaround like wrapping parts of the expressions in float2(…) will make this tiny program compile, but in 12 seconds!
testB.swift:
testB.swift compiles, but veeery slowly:
A better workaround is possible, noting that it is only the first of the three that is deemed too complex to type check, it suffices to break up the expression for `i` into two parts `iA` and `iB`:
testC.swift:
But testC.swift still takes a long time to compile, 7 seconds!
That's much longer than it took Xcode 10.1 (and macOS 10.14.3) to compile an entire medium size project that included the exact unaltered expression for `i` from test.swift above, and lots and lots of other similar expressions.
Is this because float2 is now a typealias for the new generic SIMD2<Float> (cc @stephentyrone )?
We have had to go through and modify a lot of our code because of this, and the build time has increased dramatically, especially in release builds.
The text was updated successfully, but these errors were encountered: