diff options
Diffstat (limited to 'swift.html.markdown')
-rw-r--r-- | swift.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/swift.html.markdown b/swift.html.markdown index f8fa31fe..e7f2f9a2 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -60,7 +60,7 @@ var occupations = [ "kaylee": "Mechanic" ] occupations["Jayne"] = "Public Relations" -let emptyDictionary = Dictionary<String, Float>() +let emptyDictionary = [String: Float]() // @@ -226,7 +226,6 @@ public class Shape { // If you just need to store data in a // structured object, you should use a `struct` -// A simple class `Square` extends `Shape` internal class Rect: Shape { var sideLength: Int = 1 @@ -271,6 +270,7 @@ internal class Rect: Shape { } } +// A simple class `Square` extends `Rect` class Square: Rect { convenience init() { self.init(sideLength: 5) |