Skip to content

Instantly share code, notes, and snippets.

@nddrylliog
Created September 2, 2010 23:12

Revisions

  1. nddrylliog revised this gist Sep 2, 2010. 1 changed file with 2 additions and 7 deletions.
    9 changes: 2 additions & 7 deletions call.ooc
    Original file line number Diff line number Diff line change
    @@ -6,17 +6,12 @@ Test: class {

    _store: TextCont

    something: func { something(_store) }
    something: func { something(_store&) }

    something: func ~withCont(container: TextCont) {

    /* container& as Int toString() println()
    _store& as Int toString() println()*/
    something: func ~withCont(container: TextCont@) {
    container = TextCont new()
    container value = "cheese"

    container value println()

    }

    toString: func() -> String {
  2. @roja roja created this gist Sep 2, 2010.
    30 changes: 30 additions & 0 deletions call.ooc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    TextCont: class {
    value: String
    }

    Test: class {

    _store: TextCont

    something: func { something(_store) }

    something: func ~withCont(container: TextCont) {

    /* container& as Int toString() println()
    _store& as Int toString() println()*/
    container = TextCont new()
    container value = "cheese"

    container value println()

    }

    toString: func() -> String {
    return _store value
    }

    }

    t := Test new()
    t something()
    t toString() println()