[SR-7070] Compilation never seems to finish for literal array expression #49618
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
performance
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: 2621381c1646c125860053a4e992db17
Issue Description:
I've come across what I believe is a bug. I have code along the lines of:
Given that the types are very explicit I didn't think it should be too hard to figure out the type information. Yet if this list becomes longer compilation never finishes - at least not a reasonable time. I always aborted. Also because the CPU and memory usage was crazy. (40GB of RAM and counting).
Another similar example should also demonstrate the problem:
While this compiles fine
this does not
For the time being switching to
is a really ugly workaround. If anyone has a better workaround please let me know.
I am using
$ swift -v
Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
Target: x86_64-apple-macosx10.9
/Applications/Xcode.app/Contents/Developer/usr/bin/lldb "--repl=-enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -color-diagnostics"
The text was updated successfully, but these errors were encountered: