Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View cpatterson-lilly's full-sized avatar

Chris Patterson cpatterson-lilly

View GitHub Profile
@cpatterson-lilly
cpatterson-lilly / ThrowOrDontWhatevs.swift
Last active May 9, 2017 20:27
Swift protocols don't enforce the `throws` keyword on methods? Is this a bug or a feature? Paste this code into a new Xcode 8.3.2 playground...
//: Playground - noun: a place where people can play
import Foundation
protocol CharacteristicValue {
func characteristicValue() throws -> Data
}
extension String: CharacteristicValue {