Skip to content

Commit

Permalink
fixing the compile error (me-- for not running sbt test first) and ad…
Browse files Browse the repository at this point in the history
…ding setters for constructor/destructor
  • Loading branch information
Stevan Little committed Feb 12, 2013
1 parent 1b090e4 commit 1d7c2e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/scala/org/moe/runtime/MoeClass.scala
Expand Up @@ -17,8 +17,8 @@ class MoeClass(
private var superclass: Option[MoeClass] = None
) extends MoeObject {

private var constructor: Option[MoeMethod] // BUILD
private var destructor: Option[MoeMethod] // DEMOLISH
private var constructor: Option[MoeMethod] = None // BUILD
private var destructor: Option[MoeMethod] = None // DEMOLISH

private val methods: Map[String,MoeMethod] = new HashMap[String, MoeMethod]()
private val attributes: Map[String,MoeAttribute] = new HashMap[String, MoeAttribute]()
Expand Down Expand Up @@ -68,6 +68,8 @@ class MoeClass(

def getConstructor: Option[MoeMethod] = constructor

def setContructor(c: Option[MoeMethod]) = constructor = c

/**
* TODO: add a BUILDALL style method that
* walks the MRO and calls all constructors
Expand All @@ -77,6 +79,8 @@ class MoeClass(

def getDestructor: Option[MoeMethod] = destructor

def setDestructor(d: Option[MoeMethod]) = destructor = d

/**
* TODO: add a DEMOLISHALL style method that
* walks the MRO and calls all destructors
Expand Down

0 comments on commit 1d7c2e7

Please sign in to comment.