dillon1000/react

Commit

[hir][typer] infer polymorphic types from PropertyLoad and PropertyCall

--- 

Expand Hindley Milner type inference to infer dependent types. 

Say `t` is a typevar and `t'` is some type (a built-in type, phi node, or 
another typevar). 

Our type equations are as follows (please edit/correct notation 😅) 

- type substitution: `t = t'`, 

- ~~dependent~~ polymorphic property load: `t = t'.prop` 

- polymorphic function call `t = fnCall{returnType}` 

- ~~dependent property call: `t = t'.prop` (only if t'.prop is a function 
type)~~ 

- ~~dependent return type: `t = t'.[[returntype]]`~~
Browse files
Changed paths1 file
First-parent comparison
M compiler/forget/src/TypeInference/InferTypes.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…