summaryrefslogtreecommitdiff
path: root/mnv/runtime/syntax/testdir/input/mnv9_constructors.mnv
blob: ca424a53c4645b56de6fc403db13c2f607935496 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mnv9script
# MNV9 constructors


class A
  static var _instance: A
  var str: string
  def _new(str: string)
    this.str = str
  enddef
  static def GetInstance(str: string): A
    if _instance == null
      _instance = A._new(str)
    endif
    return _instance
  enddef
endclass