[Mono-bugs] [Bug 329685] New: NotImplementedException in smcs, works in gmcs

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Sep 30 16:02:44 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=329685

           Summary: NotImplementedException in smcs, works in gmcs
           Product: Mono: Compilers
           Version: 1.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: rharinath at novell.com
        ReportedBy: vargaz at gmail.com
         QAContact: mono-bugs at ximian.com
          Found By: ---


The following testcase compiles fine with gmcs, but with smcs, it aborts with
a NotImplementedException:

Exception caught by the compiler while compiling:
   Block that caused the problem begin at: bug.cs(15,29):
                     Block being compiled: [bug.cs(17,17):,Internal(1,1):]
System.NotImplementedException: The requested feature is not implemented.
Interna compiler error at bug.cs(15,29):: exception caught while emitting
MethodBuilder [Tests::foo]

Unhandled Exception: System.NotImplementedException: The requested feature is
not implemented.
  at Mono.CSharp.TypeInferenceContext.OutputTypeInference
(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression e, System.Type t) [0x00000]
  at Mono.CSharp.TypeInferenceV3.InferInPhases (Mono.CSharp.EmitContext ec,
Mono.CSharp.TypeInferenceContext tic, ParameterData methodParameters) [0x00000]
  at Mono.CSharp.TypeInferenceV3.InferMethodArguments (Mono.CSharp.EmitContext
ec, System.Reflection.MethodBase method) [0x00000]
  at Mono.CSharp.TypeManager.InferTypeArguments (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments, System.Reflection.MethodBase& method)
[0x00000]
  at Mono.CSharp.Invocation.IsApplicable (Mono.CSharp.EmitContext ec,
Mono.CSharp.MethodGroupExpr me, System.Collections.ArrayList arguments, Int32
arg_count, System.Reflection.MethodBase& method) [0x00000]
  at Mono.CSharp.MethodGroupExpr.OverloadResolve (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList Arguments, Boolean may_fail, Location loc)
[0x00000]
  at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.EmitContext ec)
[0x00000]
  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000]
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.Assign.DoResolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000]
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.EmitContext
ec) [0x00000]
  at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.EmitContext ec)
[0x00000]
  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters
ip, IMethodData md, System.Boolean& unreachable) [0x00000]

Testcase:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
using System;
using System.IO;
using System.Reflection;

class Tests {

        public static T[] FindAll<T>(T[] array, Predicate<T> match) {
                return new T[0];
        }

        private bool ProtectedOnly(MemberInfo input) {
                return false;
        }

        public MemberInfo[] foo () {
                string name = "FOO";
                MemberInfo[] res = FindAll(typeof (int).GetMember(name,
BindingFlags.Static | BindingFlags.Instance | BindingFlags.NonPublic),
ProtectedOnly);
                return res;
        }

        public static void Main (String[] args) {
                new Tests ().foo ();
        }
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list