diff --git a/JSIL.Libraries/Includes/Core/Reflection/Classes/System.Reflection.Assembly.js b/JSIL.Libraries/Includes/Core/Reflection/Classes/System.Reflection.Assembly.js index b03d35d05..ef20aaf62 100644 --- a/JSIL.Libraries/Includes/Core/Reflection/Classes/System.Reflection.Assembly.js +++ b/JSIL.Libraries/Includes/Core/Reflection/Classes/System.Reflection.Assembly.js @@ -54,14 +54,14 @@ $.Method({ Static: false, Public: true }, "GetType", (new JSIL.MethodSignature($jsilcore.TypeRef("System.Type"), [$.String], [])), function GetType(name) { - return JSIL.GetTypeFromAssembly(this, name, null, false); + return JSIL.ReflectionGetTypeInternal(this, name, false, false); } ); $.Method({ Static: false, Public: true }, "GetType", (new JSIL.MethodSignature($jsilcore.TypeRef("System.Type"), [$.String, $.Boolean], [])), function GetType(name, throwOnError) { - return JSIL.GetTypeFromAssembly(this, name, null, throwOnError); + return JSIL.ReflectionGetTypeInternal(this, name, throwOnError, false); } ); @@ -81,7 +81,7 @@ if (ignoreCase) throw new Error("ignoreCase not implemented"); - return JSIL.GetTypeFromAssembly(this, name, null, throwOnError); + return JSIL.ReflectionGetTypeInternal(this, name, throwOnError, ignoreCase); } ); diff --git a/Tests/SimpleTestCases/GetTypeFromAssembly_Issue1035.cs b/Tests/SimpleTestCases/GetTypeFromAssembly_Issue1035.cs new file mode 100644 index 000000000..8570e88cd --- /dev/null +++ b/Tests/SimpleTestCases/GetTypeFromAssembly_Issue1035.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +public static class Program +{ + public static void Main(string[] args) + { + var typeInt32 = typeof(object).Assembly.GetType("System.Int32"); + var typeDictionary = + typeof (object).Assembly.GetType( + "System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Object, mscorlib]]"); + Console.WriteLine( + "{0} {1}", typeInt32.Name, typeDictionary.Name + ); + + } +} \ No newline at end of file diff --git a/Tests/SimpleTests.csproj b/Tests/SimpleTests.csproj index 6c9957201..fe2112c10 100644 --- a/Tests/SimpleTests.csproj +++ b/Tests/SimpleTests.csproj @@ -143,6 +143,7 @@ +