I am trying to unsafe cast an UIImageView in LLDB. I am getting the error: unknown type name 'let'. Here is a screen shot error: unknown type name
I have tried importing UIkit
expr -l Swift -- import UIKit
but it does not fix the issue.
I am trying to unsafe cast an UIImageView in LLDB. I am getting the error: unknown type name 'let'. Here is a screen shot error: unknown type name
I have tried importing UIkit
expr -l Swift -- import UIKit
but it does not fix the issue.
It looks to me like you are trying to evaluate a swift expression when not stopped in a Swift frame. lldb guesses the appropriate language to use for expressions from the language of the current frame. If this were C then "let" is in the position to be a type name, making sense of the error.
What happens if you do:
(lldb) expr -l swift --
You can force all expressions to be run as swift expressions using:
(lldb) settings set target.language swift
if that suits your purposes better.
(lldb) expr -l swift -- Enter expressions, then terminate with an empty line to evaluate: 1 I do not know what happened but after restarting the application I can not replicate the problem.
.self, not.safe