[SR-11509] Compiler crash when referencing out-of-scope value in property wrapper parameters #53910
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
property wrappers
Feature: property wrappers
Environment
Swift 5.1 in Xcode 11 GM2
Additional Detail from JIRA
md5: 864e467dd8ecdba5276417cf6e2fecdd
Issue Description:
The following code crashes the compiler:
With this error:
Note the warning as well, it seems the compiler doesn't realize we're using the
scopedValue
variable, if it did, it may be able to diagnose that that's not correct (in fact, this works and we get a correct compiler error ifscopedValue
is a member of a typefunctionScope
is part of instead of a local variable of the function)The text was updated successfully, but these errors were encountered: