Type inference assigns name to method generic args that conflict with type generic args
See original GitHub issueThis causes problems when resolving inlined expressions in Fable. For example, in the image below, FCS tells Fable there are two generic args for RouteBuilder, both named a
and when inlining the code, Fable incorrectly assumes typeof<'a>.Name
is “String” . See https://github.com/fable-compiler/repl/issues/152
Is this intended or cannot easily be fixed? It’d be very helpful to work on the assumption all generic arguments have unique names.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
TypeScript generic's type inference fails if generic is used ...
So for some reason TypeScript can't infer the string type if it's used in a function argument. Why is this? typescript · generics...
Read more >typescript - Inference of generic type argument of class fails ...
typescript - Inference of generic type argument of class fails depending on properties on that class - Stack Overflow.
Read more >Type Inference - Learning the Java Language
Type inference is a Java compiler's ability to look at each method invocation and corresponding declaration to determine the type argument (or arguments)...
Read more >Support for type hints — Python 3.11.4 documentation
A generic type can have any number of type variables. All varieties of TypeVar are permissible as parameters for a generic type: from...
Read more >Essential C#: Generic Methods
To declare a generic method, you specify the generic type parameters the same way you do for generic types: Add the type parameter...
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 FreeTop 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
Top GitHub Comments
I don’t think that should’ve been closed, since it’s not exactly a codelens langservice related one
@psfinaki No worries! The screenshot was indeed confusing 😃