{"action":"created","issue":{"url":"https://api.github.com/repos/xunit/xunit/issues/634","labels_url":"https://api.github.com/repos/xunit/xunit/issues/634/labels{/name}","comments_url":"https://api.github.com/repos/xunit/xunit/issues/634/comments","events_url":"https://api.github.com/repos/xunit/xunit/issues/634/events","html_url":"https://github.com/xunit/xunit/issues/634","id":112459694,"number":634,"title":"Can't use generic parameter type in Theory -- FormatTypeName null refs on generic parameters","user":{"login":"nguerrera","id":75470,"avatar_url":"https://avatars.githubusercontent.com/u/75470?v=3","gravatar_id":"","url":"https://api.github.com/users/nguerrera","html_url":"https://github.com/nguerrera","followers_url":"https://api.github.com/users/nguerrera/followers","following_url":"https://api.github.com/users/nguerrera/following{/other_user}","gists_url":"https://api.github.com/users/nguerrera/gists{/gist_id}","starred_url":"https://api.github.com/users/nguerrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguerrera/subscriptions","organizations_url":"https://api.github.com/users/nguerrera/orgs","repos_url":"https://api.github.com/users/nguerrera/repos","events_url":"https://api.github.com/users/nguerrera/events{/privacy}","received_events_url":"https://api.github.com/users/nguerrera/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-20T21:01:01Z","updated_at":"2015-10-24T12:51:28Z","closed_at":null,"body":"Given the following, the 'Repro' test will fail due to a NullReferenceException in v2.1.0.\r\n\r\n``` C#\r\npublic static readonly object[][] ReproData = new[] {\r\n    new object[] { typeof(List<>).GetTypeInfo().GenericTypeParameters.First() },\r\n};\r\n\r\n[Theory]\r\n[MemberData(\"ReproData\")]\r\npublic static void Repro(Type type) {}\r\n```\r\n\r\nThe issue appears to be here: https://github.com/xunit/xunit/blob/6c62c646ef19ae1fb938447805afd132fa90d966/src/xunit.assert/Asserts/Sdk/ArgumentFormatter.cs#L174\r\n\r\nRegrettably, TypeInfo.FullName is null for type parameters."},"comment":{"url":"https://api.github.com/repos/xunit/xunit/issues/comments/150809346","html_url":"https://github.com/xunit/xunit/issues/634#issuecomment-150809346","issue_url":"https://api.github.com/repos/xunit/xunit/issues/634","id":150809346,"user":{"login":"jongleur1983","id":2063360,"avatar_url":"https://avatars.githubusercontent.com/u/2063360?v=3","gravatar_id":"","url":"https://api.github.com/users/jongleur1983","html_url":"https://github.com/jongleur1983","followers_url":"https://api.github.com/users/jongleur1983/followers","following_url":"https://api.github.com/users/jongleur1983/following{/other_user}","gists_url":"https://api.github.com/users/jongleur1983/gists{/gist_id}","starred_url":"https://api.github.com/users/jongleur1983/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jongleur1983/subscriptions","organizations_url":"https://api.github.com/users/jongleur1983/orgs","repos_url":"https://api.github.com/users/jongleur1983/repos","events_url":"https://api.github.com/users/jongleur1983/events{/privacy}","received_events_url":"https://api.github.com/users/jongleur1983/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T12:51:27Z","updated_at":"2015-10-24T12:51:27Z","body":"as far as I can see the problem is that `typeof(List<>).GetTypeInfo().GenericTypeParameters.First()`does return something like a Type placeholder, where TypeName is T, but FullName is null, as long as T is not set to a specific type.\r\n\r\nUsing `typeof(List<int>.GetTypeInfo().GenericTypeParameters.First()` works as expected of course.\r\n\r\nI traced it down to an exception silently handled in TheoryDiscoverer.Discover, digging further now.\r\n\r\n"}}