Skip to content

Commit

Permalink
get rid of a few warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mattneub committed Jul 7, 2018
1 parent 6021199 commit 411ed7e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -351,9 +351,9 @@ class ViewController: UIViewController {
}

let m = [4,1,5,7,2].myMin() // 1
print(m)
print(m as Any)
// let dd = [Digit(number:12), Digit(number:42)].min() // compile error
print([4,1,5].myMin())
print([4,1,5].myMin() as Any)


}
Expand Down
Expand Up @@ -37,7 +37,7 @@ class ViewController: UIViewController {

let b = UIButton()
b.setTitle("hey", for: .normal)
print(b.title(for:.normal)) // nil
print(b.title(for:.normal) as Any) // nil
}
}

2 changes: 1 addition & 1 deletion bk1ch05p240error/bk1ch05p241error/ViewController.swift
Expand Up @@ -74,7 +74,7 @@ class ViewController: UIViewController {
out: do {
// ...
print("starting")
let somethingBadHappened = true
var somethingBadHappened : Bool { return true }
if somethingBadHappened {
break out
}
Expand Down

0 comments on commit 411ed7e

Please sign in to comment.