You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.
let classMapping = ["subclass1": SubClass1.self, "subclass2": SubClass2.self]
let myClass = classMapping["subclass1"]
Steps to Reproduce:
Create an OS X swift playground paste in the code in the description section between the ==== and then see the crash on the line creating the dictionary.
Expected Results:
That it doesn't crash. That the classMapping const is of type [String:BaseClass.Type].
Actual Results:
I get a crash with the following output:
Description
Summary:
When running the following code in a Xcode 6.1 GM seed and 6.1 b2 swift playground for OS X there is a crash.
import Cocoa
class BaseClass {
let classDescription: String
init(description: String) {
self.classDescription = description
}
func description() -> String { return self.classDescription }
}
class SubClass1 : BaseClass {
init() {
super.init(description: "subclass1")
}
}
class SubClass2 : BaseClass {
init() {
super.init(description: "subclass2")
}
}
let classMapping = ["subclass1": SubClass1.self, "subclass2": SubClass2.self]
let myClass = classMapping["subclass1"]
Steps to Reproduce:
Create an OS X swift playground paste in the code in the description section between the ==== and then see the crash on the line creating the dictionary.
Expected Results:
That it doesn't crash. That the classMapping const is of type [String:BaseClass.Type].
Actual Results:
I get a crash with the following output:
if let
andguard let
to assign toself
in failable value type initializers #1: tid = 0x366b, 0x00000001024b4a65 libswiftCore.dylib`swift_getSummary + 37, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x68)swift_getSummary + 37 frame #1: 0x0000000102590b8c libswiftCore.dylib
-[SwiftObject debugDescription] + 92frame 22108390: Swift 2.0b4: Allow assignment of nil to self in failable initializers to indicate failure #2: 0x000000010275bb40 libswiftFoundation.dylib
protocol witness for Swift.MirrorType.summary.getter : Swift.String in conformance Foundation._ObjCMirror : Swift.MirrorType + 64 frame #3: 0x0000000102327f3b PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.getSummaries (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.Bool) -> (brief : Swift.String, long : Swift.String) + 171frame 22108127: Apple Music: CarPlay does not show the For You Playlists #4: 0x000000010232a963 PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encodeStructuredImpl (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64, Swift.Array<Swift.Range<Swift.UInt64>>...) -> () + 867 frame #5: 0x0000000102326c4a PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encodeStructured (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64, PlaygroundLogger.LoggerCappingPolicy) -> () + 1562frame 22108095: Changing account in Music app requires force-quit #6: 0x0000000102327263 PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encodeStructured (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64) -> () + 323 frame #7: 0x000000010232d5c0 PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encode (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64) -> () + 7776frame 22107434: Providing Generic Generator for protocol intermittently crashes compiler #8: 0x0000000102327deb PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encodeChildren (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64, Swift.Range<Swift.UInt64>) -> () + 2203 frame #9: 0x000000010232b301 PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encodeStructuredImpl (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64, Swift.Array<Swift.Range<Swift.UInt64>>...) -> () + 3329frame 22107245: Xcode 7 beta 4 (7A165t) Interface Builder ignores background color set on UITableView #10: 0x0000000102326a68 PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encodeStructured (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64, PlaygroundLogger.LoggerCappingPolicy) -> () + 1080 frame #11: 0x00000001023273bf PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encodeStructured (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64) -> () + 671frame 22106516: watchOS 2 Beta 4: Can’t Import CoreText #12: 0x000000010232d5c0 PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encode (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64) -> () + 7776 frame #13: 0x0000000102327deb PlaygroundLogger
PlaygroundLogger.PlaygroundObjectWriter.encodeChildren (PlaygroundLogger.PlaygroundObjectWriter)(Swift.MirrorType, Swift.UInt64, Swift.Range<Swift.UInt64>) -> () + 2203frame 22105625: Mac OS X 10.11: Battery status alwasy shows "20:00 Remaining" #14: 0x000000010232b301 PlaygroundLogger`PlaygroundLogg
Version:
Xcode 6.1 beta 2, and Xcode 6.1 beta 3. Swift playground for OSX.
Notes:
Configuration:
15" MBP non Retina. 16GByte Ram. 500GByte SSD drive.
Product Version: 6.1
Created: 2014-09-30T18:28:27.413564
Originated: 2014-09-30T00:00:00
Open Radar Link: http://www.openradar.me/18503353
The text was updated successfully, but these errors were encountered: