[swift-users] LLDB can't access the value of an associated type variable

Jim Ingham jingham at apple.com
Mon Nov 14 16:15:54 CST 2016


> On Nov 12, 2016, at 3:13 AM, Trevör ANNE DENISE via swift-users <swift-users at swift.org> wrote:
> 
> Hello,
> 
> I have an issue with a project, I was trying to inspect the value of a constant of type [GeneType], this type is defined as an associatedtype of a protocol, so there is no explicit type for it, just a constraint to be Hashable :
> 
> > protocol GAStandardGenomeRepresentable {
> >    
> >    associatedtype GeneType:Hashable
> >    
> >    var standardRepresentation: [GeneType] { get }
> >    
> >    init(standardRepresentation:[GeneType])
> >    
> >
> >    
> > }
> 
>  Unfortunately, inside of Xcode debugger or even by typing po nameOfMyConstant in the LLDB console there is no value, just this error :
> error: <EXPR>:3:1: error: use of unresolved identifier 'child1Representation'
> child1Representation
> 
> Also, if I click on the little (i) icon when my variable is selected in the variables list of the debugger, here is what is displayed in the LLDB console :
> Printing description of child1Representation:
> child1Representation = <could not resolve type>
> 
> I can't understand at all what is going on ! I am in debug mode and optimisations are set to none ! I even moved my source files over to a new project, just in case I had done something wrong in the other project settings, but that didn't change anything !
> 
> Do you have any idea of what is going on ? Is it a Swift/LLDB bug ?

It is probably a bug.  If you have a project showing the error that you can make available, please file a bug with http://bugs.swift.org or http://bugreporter.apple.com.

Thanks,

Jim


> (Xcode Version 8.1 (8B62))
> 
> Thank you.
> 
> Trevör
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users



More information about the swift-users mailing list