Top-level multi-variable single declaration with closure bug #62940
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
closures
Feature: closures
compiler
The Swift compiler itself
expressions
Feature: expressions
let & var
Feature: constant and variable declarations
mangling
Area → compiler: Mangling
multiple files
Flag: An issue whose reproduction requires multiple files
swift 6.0
unexpected behavior
Bug: Unexpected behavior or incorrect output
Description
Initializing multiple top-level variables in a single declaration where the all the initializations are immediately invoked closures causes the later variables' initialization to be overridden by the first's.
Steps to reproduce
Make a simple Swift Package with two files.
Screenshots
Environment
Target: arm64-apple-macosx13.0
The text was updated successfully, but these errors were encountered: