diff --git a/src/Ninject.Test/Integration/ReadOnlyKernelTests.cs b/src/Ninject.Test/Integration/ReadOnlyKernelTests.cs index f4221ce5..0cdb5019 100644 --- a/src/Ninject.Test/Integration/ReadOnlyKernelTests.cs +++ b/src/Ninject.Test/Integration/ReadOnlyKernelTests.cs @@ -689,8 +689,7 @@ public void TryGet_ServiceAndConstraintAndParameters_ShouldPreferBindingForList( bindings.Should().HaveCount(2); } - - [Fact(Skip = "https://github.com/ninject/Ninject/issues/340")] + [Fact] public void TryGet_ServiceAndConstraintAndParameters_ReturnsNullWhenTypeIsUnboundGenericTypeDefinition() { var service = typeof(List<>); @@ -799,7 +798,7 @@ public void TryGet_ServiceAndConstraintAndParameters() bindings.Should().BeEmpty(); } - [Fact(Skip = "https://github.com/ninject/Ninject/issues/340")] + [Fact] public void TryGet_ServiceAndConstraintAndParameters_ReturnsNullWhenTypeIsUnboundGenericTypeDefinition() { var service = typeof(List<>); diff --git a/src/Ninject/ReadOnlyKernel.cs b/src/Ninject/ReadOnlyKernel.cs index 20bea1bb..3552a25c 100644 --- a/src/Ninject/ReadOnlyKernel.cs +++ b/src/Ninject/ReadOnlyKernel.cs @@ -492,7 +492,7 @@ void UpdateRequest(Type service) return this.ResolveAll(request, false).CastSlow(service).ToArraySlow(service); } - if (request.Service.IsGenericType) + if (request.Service.IsGenericType && !request.Service.IsGenericTypeDefinition) { var gtd = request.Service.GetGenericTypeDefinition();