Confusing behaviour with types that have both generic and non-generic versions
See original GitHub issueI ran into a couple of weird issues at source.dot.net:
- It’s impossible to find
IEnumerable<T>
(I tried with and without namespace, with and without namespace assembly name etc), - In the
List<T>
page both links toIList<T>
andIList
point to the same page (IList<T>
), - In the
IList<T>
page link toICollection<T>
points to the non-genericICollection
, - A lot of references to
IEnumerable<T>
(example) point to error page (which saysDon't use this page directly, pass #symbolId to get redirected.
)
All pointed issues are applicable for all interfaces that have both generic and non-generic versions (IEnumerator
, IEqualityComparer
etc).
The issue is probably related to https://github.com/KirillOsenkov/SourceBrowser/issues/179.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
How to implement both generic and non-generic version of ...
1 Answer. That way the generic version is a more specified subtype of the non-generic one allowing you to put more information in...
Read more >Documentation - Type Compatibility
For generic types that do not have their type arguments specified, compatibility is checked by specifying any in place of all unspecified type...
Read more >Java Generics FAQs - Under The Hood Of The Compiler
For instance, if "legacy" code uses types such as List , which used to be a regular (non-generic) types before Java 5.0, but...
Read more >PEP 695 – Type Parameter Syntax
When a type parameter is shared among multiple generic classes, functions, and type aliases, all references are semantically equivalent.
Read more >Generics can make your Go code slower
As the design document states, two concrete types are in the same gcshape grouping if and only if they have the same underlying...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
its not technically a shproj, because its been processed with my binlig -> sln translation stuff, but all the files that are flattened are in the csproj like this:
..\..\libraries\System.Private.CoreLib\src\System\Activator.cs
so I bet thats the problem. Its showing up as a “linked” file without any link.I think if you have the path for the csproj (which you should have) then each .cs path is relative to the .csproj. You can fiddle with relative paths and compute the Link metadata for those outside the project cone.
We can brainstorm this together if you like.