Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Two "from x in y" linq clauses causes runtime exception #1017

Open
phi1010 opened this issue Sep 5, 2016 · 0 comments
Open

Two "from x in y" linq clauses causes runtime exception #1017

phi1010 opened this issue Sep 5, 2016 · 0 comments
Labels

Comments

@phi1010
Copy link

phi1010 commented Sep 5, 2016

A program using two from clauses will compile, but fail with an error message I don't understand (tested on http://jsil.org/try/). If I comment out the second from clause from a2 in Enumerable.Range(1, 20) it will run without any error.

using System;
using System.Collections.Generic;
using System.Linq;

namespace HelloWorld
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            long i = 0;
            var foo =
                from a1 in Enumerable.Range(1, 20)
                from a2 in Enumerable.Range(1, 20)
                select a1;
        }
    }
}
Unhandled exception: Error: No static method with signature 'System.Collections.Generic.IEnumerable`1[!!2] SelectMany$b3$55[!!0],58[!!0,55[!!1]],63[!!0,!!1,!!2]=55[!!2]<TSource, TCollection, TResult> (System.Collections.Generic.IEnumerable`1[!!0], System.Func`2[!!0, System.Collections.Generic.IEnumerable`1[!!1]], System.Func`3[!!0, !!1, !!2])' found in context '<System.Linq.Enumerable Public Interface>'
Error: No static method with signature 'System.Collections.Generic.IEnumerable`1[!!2] SelectMany$b3$55[!!0],58[!!0,55[!!1]],63[!!0,!!1,!!2]=55[!!2]<TSource, TCollection, TResult> (System.Collections.Generic.IEnumerable`1[!!0], System.Func`2[!!0, System.Collections.Generic.IEnumerable`1[!!1]], System.Func`3[!!0, !!1, !!2])' found in context '<System.Linq.Enumerable Public Interface>'
at Object.JSIL.RuntimeErrorFormat (http://jsil.org/try/Libraries/JSIL.Core.js:10450:9)
at JSIL.MethodSignature.$StaticMethodNotFound (http://jsil.org/try/Libraries/JSIL.Core.js:7828:8)
at MethodSignature_CallStatic$3$3$inlineCache1 (jsil://closure/MethodSignature.CallStatic$3$3$inlineCache1:10:10)
at Program_Main (eval at <anonymous> (http://jsil.org/try/output_frame.js:70:41), <anonymous>:62:22)
at window.runScript (http://jsil.org/try/output_frame.js:80:5)
at runTranslatedJS (http://jsil.org/try/index.js?v6:602:20)

I assume $b3$55 represents a specific overload of the method, but what does the [!!0],58[!!0,55[!!1]],63[!!0,!!1,!!2]=55[!!2] represent? This doesn't look similar to MSIL notation.

@kg kg added the Bug label Feb 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants