Skip to content

Commit

Permalink
Enough nonsense text to make Swift 2.0 believe this is Swift.
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham Lee committed Jun 13, 2015
1 parent 37fabff commit 0161f18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions OOPinFPinSwift.playground/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func mutate(receiver: Object, selector: Selector, value:Object) -> Object {

func (message:(receiver: Object?, selector: Selector), value:Object) -> Object? {
if let receiver = message.receiver {
return mutate(receiver, message.selector, value)
return mutate(receiver, selector: message.selector, value: value)
} else {
return nil
}
Expand Down Expand Up @@ -105,7 +105,7 @@ func Integer(x: Int, proto: Object) -> Object {
}

func Point(x: Int, y: Int, proto: Object)->((_cmd:Selector)->IMP) {
let _x = Integer(x,o), _y = Integer(y,o)
let _x = Integer(x,proto: o), _y = Integer(y,proto: o)
var _self : Object! = nil
_self = { selector in
switch selector {
Expand Down Expand Up @@ -147,9 +147,9 @@ func 📓(receiver:Object?) -> String? {
}
}

let p = Point(3, 4, o)
let p = Point(3, y: 4, proto: o)
📓(p)
let p2 = (p,"x")(Integer(1,o))
let p2 = (p,"x")(Integer(1,proto: o))
📓(p2)

infix operator {}
Expand All @@ -167,5 +167,5 @@ func ✍(message:(receiver:Object?, selector:Selector), value:Object) -> Object?
}
}

let p3 = (p2, "setY:")(Integer(42, o))
let p3 = (p2, "setY:")(Integer(42, proto: o))
📓(p3)
2 changes: 1 addition & 1 deletion OOPinFPinSwift.playground/contents.xcplayground
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='osx'>
<playground version='5.0' target-platform='osx' requires-full-environment='true'>
<timeline fileName='timeline.xctimeline'/>
</playground>

0 comments on commit 0161f18

Please sign in to comment.