Skip to content

Commit

Permalink
Finished writing issue08
Browse files Browse the repository at this point in the history
  • Loading branch information
vandadnp committed Jan 16, 2015
1 parent a99c574 commit 63563fd
Show file tree
Hide file tree
Showing 6 changed files with 395 additions and 158 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Here are the available issues:
- [Issue 05 - The Builder Pattern and Fluent Interface](issue05/README.md)
- [Issue 06 - The Swift Runtime (Part 4) - Generics](issue06/README.md)
- [Issue 07 - The Swift Runtime (Part 5) - Operators](issue07/README.md)

- [Issue 08 - The Swift Runtime (Part 6) - Type Casting](issue08/README.md)
382 changes: 378 additions & 4 deletions issue08/README.md

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions issue08/exampleCode/swift-weekly.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
9DA78DE61A63A0920018D1DE /* dummy */ = {isa = PBXFileReference; lastKnownFileType = text; path = dummy; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.asm.i386; };
9DB1E34A1A48323C006CE680 /* swift-weekly.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "swift-weekly.app"; sourceTree = BUILT_PRODUCTS_DIR; };
9DB1E34E1A48323C006CE680 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9DB1E34F1A48323C006CE680 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -84,7 +83,6 @@
9DB1E3561A48323C006CE680 /* Images.xcassets */,
9DB1E3581A48323C006CE680 /* LaunchScreen.xib */,
9DB1E34D1A48323C006CE680 /* Supporting Files */,
9DA78DE61A63A0920018D1DE /* dummy */,
);
path = "swift-weekly";
sourceTree = "<group>";
Expand Down
Binary file not shown.
32 changes: 16 additions & 16 deletions issue08/exampleCode/swift-weekly/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ class ViewController: UIViewController {

}

class Vehicle{
func id() -> Int{
return 0xabcdefa
class Vehicle{
func id() -> Int{
return 0xabcdefa
}
}
}

class Car : Vehicle{
override func id() -> Int {
return 0xabcdefc

class Car : Vehicle{
override func id() -> Int {
return 0xabcdefc
}
}

func example2(){
let v: Vehicle = Car()
let c = [v][0] as Car
println(c)
}
}

func example2(){
let v: Vehicle = Car()
let c = [v][0] as Car
println(c)
}

class Bicycle : Vehicle{
override func id() -> Int {
Expand All @@ -73,6 +73,6 @@ func example2(){

example2()
}

}

135 changes: 0 additions & 135 deletions issue08/exampleCode/swift-weekly/dummy

This file was deleted.

0 comments on commit 63563fd

Please sign in to comment.