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
drodriguez opened this issue
Aug 8, 2019
· 3 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Current Swift master (4277f11) and LLVM stable (200186e28b5), in a Linux machine.
It also reproduces when using master snapshot from August 5th in macOS (Apple Swift version 5.1-dev (LLVM 200186e28b, Swift caeb2a4))
Does NOT reproduce when using Xcode 10.3 compiler (Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5))
Does NOT reproduce when using 5.1 snapshot from July 25th in macOS (Apple Swift version 5.1-dev (LLVM 688b71e2f9, Swift 0450b7d))
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug, CompilerCrash
Assignee
pschuh (JIRA)
Priority
Medium
md5: 7551db832e30a8dc577050cd990607e6
Issue Description:
When creating an extension of a type that conforms to `Sequence`, and restricting it to a `class`, being explicit about the type in a `for` loop crashes the compiler.
It crashes because of `print(foo)`. If you remove that then it compiles. Seems like its trying to cast foo (of type Foo) to a ReferenceStorageType and then crashing.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Environment
Current Swift master (4277f11) and LLVM stable (200186e28b5), in a Linux machine.
It also reproduces when using master snapshot from August 5th in macOS (Apple Swift version 5.1-dev (LLVM 200186e28b, Swift caeb2a4))
Does NOT reproduce when using Xcode 10.3 compiler (Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5))
Does NOT reproduce when using 5.1 snapshot from July 25th in macOS (Apple Swift version 5.1-dev (LLVM 688b71e2f9, Swift 0450b7d))
Additional Detail from JIRA
md5: 7551db832e30a8dc577050cd990607e6
Issue Description:
When creating an extension of a type that conforms to `Sequence`, and restricting it to a `class`, being explicit about the type in a `for` loop crashes the compiler.
Example:
Produces:
The problem disappears if `class Foo {}` is a `protocol`, or if `for foo: Foo in self` doesn't explicitly use the `Foo` type.
PR with the crashing test: #26550
The text was updated successfully, but these errors were encountered: