[SR-2139] 'let' ivars in generic subclass of NSObject invalid #44747
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 3.0
Environment
Version 8.0 beta 3 (8S174q)
Additional Detail from JIRA
md5: 4bbf8b4677cba6abe7fe12f3e7f55197
Issue Description:
The following code should print "5" but prints "0" in Swift 3 (both -O and -Onone)
Code works as expected in Swift 2.3.
Any of the following will work around the problem: don't inherit from NSObject, replace generic parameter with `Int`, replace `let` with `var`.
According to debugger, correct value is passed into constructor and assigned to `value`. Problem appears to occur after that point.
The text was updated successfully, but these errors were encountered: