Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Patterson cpatterson-lilly

View GitHub Profile
@cpatterson-lilly
cpatterson-lilly / ThrowOrDontWhatevs.swift
Last active May 9, 2017
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...
View ThrowOrDontWhatevs.swift
//: Playground - noun: a place where people can play
import Foundation
protocol CharacteristicValue {
func characteristicValue() throws -> Data
}
extension String: CharacteristicValue {
You can’t perform that action at this time.