Skip to content

Thinks SomeRandomDto[] is enumerable and attempts to find generic arguments #140

@PerfectlyNormal

Description

@PerfectlyNormal
Unhandled exception: System.InvalidOperationException: Expected System.Object to have a generic type argument, but unable to find any.
   at TypeContractor.Helpers.TypeChecks.GetGenericType(Type sourceType, Int32 index) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/Helpers/TypeChecks.cs:line 105
   at TypeContractor.Helpers.TypeChecks.GetGenericType(Type sourceType, Int32 index) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/Helpers/TypeChecks.cs:line 103
   at TypeContractor.Helpers.TypeChecks.GetGenericType(Type sourceType, Int32 index) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/Helpers/TypeChecks.cs:line 103
   at TypeContractor.TypeScript.TypeScriptConverter.GetDestinationType(Type& sourceType, IEnumerable`1 customAttributes, Boolean isReadonly, Boolean isNullable) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 135
   at TypeContractor.TypeScript.TypeScriptConverter.GetProperties(Type type) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 77
   at TypeContractor.TypeScript.TypeScriptConverter.Convert(Type type, ContractedType contractedType) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 23
   at TypeContractor.TypeScript.TypeScriptConverter.GetDestinationType(Type& sourceType, IEnumerable`1 customAttributes, Boolean isReadonly, Boolean isNullable) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 178
   at TypeContractor.TypeScript.TypeScriptConverter.GetDestinationType(Type& sourceType, IEnumerable`1 customAttributes, Boolean isReadonly, Boolean isNullable) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 137
   at TypeContractor.TypeScript.TypeScriptConverter.GetProperties(Type type) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 77
   at TypeContractor.TypeScript.TypeScriptConverter.Convert(Type type, ContractedType contractedType) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 23
   at TypeContractor.TypeScript.TypeScriptConverter.GetDestinationType(Type& sourceType, IEnumerable`1 customAttributes, Boolean isReadonly, Boolean isNullable) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 178
   at TypeContractor.TypeScript.TypeScriptConverter.GetDestinationType(Type& sourceType, IEnumerable`1 customAttributes, Boolean isReadonly, Boolean isNullable) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 137
   at TypeContractor.TypeScript.TypeScriptConverter.GetProperties(Type type) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 77
   at TypeContractor.TypeScript.TypeScriptConverter.Convert(Type type, ContractedType contractedType) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 23
   at TypeContractor.TypeScript.TypeScriptConverter.Convert(ContractedType contractedType) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/TypeScript/TypeScriptConverter.cs:line 14
   at System.Linq.Enumerable.ListSelectIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.ListSelectIterator`2.ToList()
   at TypeContractor.Contractor.Build(MetadataLoadContext metadataLoadContext, Boolean smartClean) in /home/runner/work/TypeContractor/TypeContractor/TypeContractor/Contractor.cs:line 84
   at TypeContractor.Tool.Generator.Execute() in /home/runner/work/TypeContractor/TypeContractor/TypeContractor.Tool/Generator.cs:line 158

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions