X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FMicrosoft.JScript%2FMicrosoft.JScript%2FFunctionObject.cs;h=8fdcb5c2f9342f9d1503f5b2483c4a4ffc4d8bf7;hb=32de363917ad562cbbbf57259a4f02f3645e9bc5;hp=bbc82b46a5ea17d3de997d99d7aa53b25b7fd6e2;hpb=9e58410e730f022a7e7dd97a6f2008d10c9df20c;p=mono.git diff --git a/mcs/class/Microsoft.JScript/Microsoft.JScript/FunctionObject.cs b/mcs/class/Microsoft.JScript/Microsoft.JScript/FunctionObject.cs index bbc82b46a5e..8fdcb5c2f93 100644 --- a/mcs/class/Microsoft.JScript/Microsoft.JScript/FunctionObject.cs +++ b/mcs/class/Microsoft.JScript/Microsoft.JScript/FunctionObject.cs @@ -37,7 +37,6 @@ namespace Microsoft.JScript { public class FunctionObject : ScriptFunction { - internal MethodAttributes attr; internal string name; internal string type_annot; internal Type return_type; @@ -49,6 +48,14 @@ namespace Microsoft.JScript { 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) { // @@ -89,7 +96,7 @@ namespace Microsoft.JScript { 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");