[Mono-bugs] [Bug 389625] New: gmcs NotImplementedException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue May 13 01:08:12 EDT 2008


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


           Summary: gmcs NotImplementedException
           Product: Mono: Compilers
           Version: 1.9.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: petee at mindtouch.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


The following code cause gmcs to crash:

namespace Bug {
    using Yield = System.Collections.Generic.IEnumerator<IYield>;

    public interface IYield { }

    public delegate Yield CoroutineHandler<T1, T2, TResult>(T1 arg1, T2 arg2,
TResult result);

    public class ResultBase { }

    public class Result : ResultBase { }

    public class Test {

        public static TResult Invoke<T1, T2, TResult>(CoroutineHandler<T1, T2,
TResult> callee, T1 arg1, T2 arg2, TResult result) where TResult : ResultBase {
            return null;
        }

        static Yield Sample(string arg1, string arg2, Result result) {
            yield break;
        }

        static void Main(string[] args) {

            // ACTUAL: Internal compiler error at bug-003.cs(22,21):: exception
caught while emitting MethodBuilder [Test::Main]
            Result result = Invoke(Sample, "one", "two", new Result());
        }
    }
}

---
frog:mono-tests petee$ gmcs bug-003.cs 
Exception caught by the compiler while compiling:
   Block that caused the problem begin at: bug-003.cs(22,21):
                     Block being compiled:
[bug-003.cs(22,41):,bug-003.cs(26,9):]
System.NotImplementedException: The requested feature is not implemented.
Internal compiler error at bug-003.cs(22,21):: exception caught while emitting
MethodBuilder [Test::Main]

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.MethodGroupExpr.IsApplicable (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments, Int32 arg_count,
System.Reflection.MethodBase& method, System.Boolean& params_expanded_form)
[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.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters
ip, IMethodData md, System.Boolean& unreachable) [0x00000]


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


More information about the mono-bugs mailing list