While debugging I would like to get a specific subclass's property. So far I can do this:
if let myPeg = getTargetSlot(node: node, location touchLocation){
print (myPeg.index)
}
Is it possible to write it in one line? Something like this?
print ("\(getTargetSlot(node: node, location touchLocation).index")
Because if there is a way, I cannot figure out the syntax.
Thanks