NaturalDocs / NaturalDocs

Natural Docs source code documentation system
http://www.naturaldocs.org
192 stars 33 forks source link

C# out parameters with nullable context confuse the parser #76

Closed mmano closed 9 months ago

mmano commented 2 years ago

I've realized that the following method signature confuses the parser (no error on the result command line, but the method is silently excluded from the doc result set)

 public bool TryParse<T>(string text, out RangeDomain<T>? domain) where T : struct, IComparable<T>, IConvertible

It turns out that the culprit is out GenericParameterType? parameter, and more specifically the ?. The ? makes sense when compiling with nullable contexts.

NaturalDocs commented 2 years ago

It's the combination of \<T> and ?. I had the parser check for them in the wrong order. It's fixed in this version, which contains the previous fixes as well.

https://www.naturaldocs.org/download/temp/Natural_Docs_temp3.zip

NaturalDocs commented 2 years ago

This fix has been included in Natural Docs 2.3 Development Release 1.

NaturalDocs commented 9 months ago

Natural Docs 2.3 was released which includes this fix so I'm closing the issue.