Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #23 from bowmanb/master

fix for Issue #19: Overloading methods example raises exception using scala 2.9.1
  • Loading branch information...
commit 7f5d90969f70a4154781c660041f205e51fa2a4a 2 parents 3c5ef2d + cba8720
@stuhood stuhood authored
View
2  web/_posts/2011-05-01-lesson.textile
@@ -314,7 +314,7 @@ h3. Overloading methods
<pre>
class EvenMoreScientificCalculator(brand: String) extends ScientificCalculator(brand) {
- def log(m: Int) = log(m, math.exp(1))
+ def log(m: Int): Double = log(m, math.exp(1))
}
</pre>
View
2  web/_posts/2011-05-03-lesson.textile
@@ -132,7 +132,7 @@ A first instinct might be to do something conditionally based on the <code>isDef
<code>
// We want to multiply the number by two, otherwise return 0.
-val result = if (res1.isDefined()) {
+val result = if (res1.isDefined) {
res1.get * 2
} else {
0
Please sign in to comment.
Something went wrong with that request. Please try again.