Compiler Hangs on Swift 5.10 and Crashes with Latest Swift 6.0 Snapshot When Using lazy var
with try
#73073
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
crash
Bug: A crash, i.e., an abnormal termination of software
error handling
lazy var
Feature: Lazy variables
throw
Feature → error handling: Throw statements
type checker
Area → compiler: Semantic analysis
Description
I've encountered an issue where the compiler hangs when building the following code with Swift 5.10. When switching to the latest daily build of Swift 6.0,(swift-6.0-DEVELOPMENT-SNAPSHOT-2024-04-15-a) the compiler crashes instead.
Reproduction
Expected behavior
The compiler should handle the
lazy var
initialization with atry
without hanging or crashing, and either compile the code or produce a meaningful compilation error if the usage is incorrect.Environment
swift
MacOS
Additional information
No response
The text was updated successfully, but these errors were encountered: