swift
swift copied to clipboard
[SR-2452] Mistaken reference to `.dynamicType` in debugger
| Previous ID | SR-2452 |
| Radar | None |
| Original Reporter | @jadengeller |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Attachment: Download
Environment
Xcode 8 beta 6, swift 3
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug |
| Assignee | None |
| Priority | Medium |
md5: 6b2a018133e25aaf75a24fdc01096d1c
Issue Description:
When you use `.class`, the debugger suggests using `.dynamicType` even though this was replaced with `type(of:)`.
That looks like it's coming from us, somewhere.
An SDK change got this one a while ago.
Welcome to Apple Swift version 4.0 (swiftlang-900.0.53 clang-900.0.29). Type :help for assistance.
1> import Foundation
2> let newObject : NSObject? = NSObject()
newObject: NSObject? = 0x0000000100400630
3> newObject?.class
error: repl.swift:3:12: error: 'class()' is unavailable in Swift: use 'type(of:)' instead
newObject?.class