public class FunctionObject : ScriptFunction {
- internal MethodAttributes attr;
internal string name;
internal string type_annot;
internal Type return_type;
this.name = name;
}
+ internal FunctionObject (MethodInfo info)
+ {
+ this.method = info;
+ this.name = info.Name;
+ this.attr = info.Attributes;
+ this.return_type = info.ReturnType;
+ }
+
internal FunctionObject (string name, FormalParameterList p, string ret_type, Block body)
{
//
sb.Append (this.parameters.ToString ());
sb.Append (")");
- if (return_type != null)
+ if (return_type != null && return_type != typeof (void))
sb.Append (" : " + return_type);
sb.Append (" {\n");