[SR-8440] Using self inside a let initializer #50962
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
duplicate
Resolution: Duplicates another issue
expressions
Feature: expressions
identifiers
Feature: Identifiers
missing warning
Bug: Missing warning
self
Feature → expressions: The 'self' expression
swift 5.6
type checker
Area → compiler: Semantic analysis
Environment
Xcode 9.4.1 - Swift 4.1
Additional Detail from JIRA
md5: e2dca743fabfb653f26fcddaaaf02779
duplicates:
Issue Description:
Using
self
inside an initializer causes compiler error, which makes sense.However, trying to use self to hookup a
touchUpInside
action on a UIKit object (for exampleUIButton
) which is a let computed property doesn't cause compiler errors.Below code is what I mean:
And the action doesn't work but the code compiles and runs.
The text was updated successfully, but these errors were encountered: