sq / JSIL

CIL to Javascript Compiler

Home Page:http://jsil.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GetType.FullName doesn't have quite the same behaviour as .NET.

michaelcheers opened this issue · comments

See Bridge Issue.
Dot Net Fiddle

Expected

System.String, System.Int32, System.Byte, System.UInt32, System.Int64, System.UInt64, System.Int16, System.UInt16, System.SByte, System.String[], System.Func`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.RuntimeType, System.Boolean, App+Enum, System.RuntimeType, System.RuntimeType, System.RuntimeType, System.RuntimeType, System.Double, System.Single, System.Char, System.Decimal, <>f__AnonymousType0`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Actual

System.String, System.Int32, System.Int32, System.Int32, System.Int64, System.UInt64, System.Int32, System.Int32, System.Int32, System.Array, System.Func`2[[System.Int32, JSIL.Core][System.String, JSIL.Core]], System.RuntimeType, System.Boolean, App+Enum, System.RuntimeType, System.RuntimeType, System.RuntimeType, System.RuntimeType, System.Int32, System.Int32, System.String, System.Int32, <>__AnonType0`1[[System.Int32, JSIL.Core]]

These aren't the same.
Though, you've done better than Bridge did.

On latest JSIL version I have very few difference (TryJSIL is pretty outdated):
C#:

System.Func`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
<>f__AnonymousType0`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

JS:

System.Func`2[[System.Int32, mscorlib][System.String, mscorlib]]
<>f__AnonymousType0`1[[System.Int32, mscorlib]]
System.Collections.Generic.List`1[[System.Int32, mscorlib]]

So, in other words, only generic parameters assembly is shown different. Unfortunately it is pretty hard to fix for types that was defined in JSIL Libraries, but it should work correct for all actually translated types.