[nem-en] about local functions

Ivan Lakhturov lakhturov at gmail.com
Tue Dec 19 10:45:21 CET 2006


Hello devel-en,

  i'm defining local function:

      def chainInsideDecl(decl : Decl)
      {
        | GlobalAttribute => []
        | Using => []
        | Namespace => []
        | Type(typeBuilder) => []
        | _ => []
      }

  i need to specify type decl : Decl, then i can define match cases
  without specifying full names of variants (e.g. not Decl.Namespace,
  just Namespace instead)

  however, if i omit specifying type in a definition:

      def chainInsideDecl(decl)

  it doesn't compile, although a type of decl is inferred
  need this situtation an enhancing?

  btw, do local funcitons support overloading?
  

regards, phantom




More information about the devel-en mailing list