Created
December 21, 2017 20:18
-
-
Save garata/150e92605a2cfcfdaa5acea34a93f404 to your computer and use it in GitHub Desktop.
JSIL 1051 issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using JSIL; | |
using JSIL.Meta; | |
class Class1 | |
{ | |
public Class1() | |
{ | |
Delegate d = new Action<int>( | |
(int someVar) => | |
{ | |
}); | |
var p = d.Method.GetParameters(); // TypeError: d.get_Method(...) is null | |
} | |
} | |
class Class2 | |
{ | |
public Class2() | |
{ | |
MemberMethod(); | |
} | |
public void MemberMethod() | |
{ | |
Delegate d = new Action<int>( | |
(int someVar) => | |
{ | |
}); | |
var p = d.Method.GetParameters(); // TypeError: d.get_Method(...) is null | |
} | |
} | |
public static class Program { | |
public static void Main () { | |
Delegate d = new Action<int>( | |
(int console) => | |
{ | |
}); | |
var p = d.Method.GetParameters(); | |
Console.WriteLine("Static method version works."); | |
Class2 clazz2 = new Class2(); | |
Console.WriteLine("Member method call version works."); | |
Class1 clazz1 = new Class1(); | |
//Crash | |
Console.WriteLine("Ctor method version works."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment