Skip to content

Instantly share code, notes, and snippets.

@jensmeder
Created June 13, 2017 09:28
Show Gist options
  • Save jensmeder/18f7b62822249823f78f7de6e1d5e0dd to your computer and use it in GitHub Desktop.
Save jensmeder/18f7b62822249823f78f7de6e1d5e0dd to your computer and use it in GitHub Desktop.
rdar://32734461 (Xcode 9 beta1: Swift generics in custom class crashes Instruments when specifying Dictionary type)
//
// AppDelegate.swift
// Crashy
//
// Created by Jens Meder on 13.06.17.
// Copyright © 2017 Jens Meder. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let _ = Memory<[String:String]>(value: ["hello":"world"])
return true
}
}
//
// Memory.swift
// Crashy
//
// Created by Jens Meder on 13.06.17.
// Copyright © 2017 Jens Meder. All rights reserved.
//
import Foundation
internal class Memory<T> {
public var value: T
// MARK: Init
internal init(value: T) {
self.value = value
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment