Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can no longer consume a local let binding that used deferred initialization #71607

Closed
tayloraswift opened this issue Feb 14, 2024 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. diagnostics QoI Bug: Diagnostics Quality of Implementation SIL

Comments

@tayloraswift
Copy link
Member

Description

it told me to file a bug

<stdin>:12:17: error: 'consume' applied to value that the compiler does not support. This is a compiler bug. Please file a bug with a small example of the bug
    _ = consume x
                ^

Reproduction

func f() 
{
    let x:[Int] ; x = []
    _ = consume x
}

Expected behavior

it worked on 5.9

Environment

Swift version 5.11-dev (LLVM 1bcf1d71b715d0d, Swift 009a93a)
Target: x86_64-unknown-linux-gnu

Additional information

it also happens on 5.10

@tayloraswift tayloraswift added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Feb 14, 2024
@MaxDesiatov MaxDesiatov added SIL diagnostics QoI Bug: Diagnostics Quality of Implementation and removed triage needed This issue needs more specific labels labels Feb 19, 2024
nate-chandler added a commit to nate-chandler/swift that referenced this issue Mar 11, 2024
@nate-chandler
Copy link
Contributor

Fixed by #72211 . Regression test added in #72225 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. diagnostics QoI Bug: Diagnostics Quality of Implementation SIL
Projects
None yet
Development

No branches or pull requests

3 participants