Debugger can't display enum values in some cases

Originator:garth
Number:rdar://21844373 Date Originated:15-Jul-2015 03:42 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7 beta 3
Classification:Serious Bug Reproducible:Always
 
Try running this function in a context that allows step-by-step debugging and inspect the value of “state” before and after the assignment of .Two. Aftwards, the debugger just shows:

state	MinimalCase.Goo	<invalid> (0x90)	<invalid> (0x90)

As near as I can tell, the enum value is in fact OK. It’s just that the debugger can’t display it.

Interestingly, the debugger’s choking on this enum seems to involve the .Three case; if you remove that from the enum definition, then the debugger shows .Two correctly.

import Foundation

func flubber()
{
    enum Goo {
        case One
        case Two(NSArray)
        case Three(NSArray)
    }
    
    var state = Goo.One
    state = .Two(NSArray())
}

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!