aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Welsh <noelwelsh@gmail.com>2017-06-09 21:52:11 +0100
committerGitHub <noreply@github.com>2017-06-09 21:52:11 +0100
commit424b242e7cc6ac4f79ce712461725471cd3ccbe4 (patch)
tree2ca4fc02ea22b873c533721a6492a928299fe83a
parent6168080be4a171f23977af01bf1e831a500fed91 (diff)
parent079782f4042ca83848f373d8f520ab22dbc683d2 (diff)
downloadcreative-scala-template-424b242e7cc6ac4f79ce712461725471cd3ccbe4.tar.gz
creative-scala-template-424b242e7cc6ac4f79ce712461725471cd3ccbe4.tar.bz2
creative-scala-template-424b242e7cc6ac4f79ce712461725471cd3ccbe4.zip
Merge pull request #1 from aaronlevin/fix-example-npe
Do not extend App to avoid NPE in Example
-rw-r--r--src/main/scala/Example.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/scala/Example.scala b/src/main/scala/Example.scala
index ac72a34..e485b9a 100644
--- a/src/main/scala/Example.scala
+++ b/src/main/scala/Example.scala
@@ -7,7 +7,10 @@ import doodle.backend.StandardInterpreter._
// To use this example, open the SBT console and type:
//
// Example.image.draw
-object Example extends App {
+object Example {
val image = circle(10).fillColor(Color.red) on circle(20) on circle(30)
- image.draw
+
+ def main(args: Array[String]): Unit = {
+ image.draw
+ }
}