New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-3304] type(of:) returning different values when running under Debug and Release configurations #45892
Comments
Comment by Michael Ledin (JIRA) Also see http://stackoverflow.com/questions/40913036/static-vs-dynamic-type |
I agree, the debug behavior is correct. |
Oh, I missed that |
That's not how |
Note that it's |
This is how concrete |
The language design at this seam is definitely untidy. Note that |
Hm. That makes sense about the static type, but then there's no way to (directly) get the true dynamic type from inside the existential. |
As a hack, you can do |
Trying a fix: #6395 |
Should be fixed in master now. |
Environment
macOS Sierra 10.12.2 Beta (16C53a)
Xcode 8.1 (8B62)
Running on iPhone 5s with iOS 10.1.1 (14B150) and iPhone 5s (10.1) Simulator.
Additional Detail from JIRA
md5: 295c363ef8049abec94b353ce64230da
is duplicated by:
relates to:
Issue Description:
Running this code:
using Debug configuration gives:
B
B
B
B
and using Release configuration gives:
A
B
B
B
The text was updated successfully, but these errors were encountered: