Closed
Description
Version: 1.2.0
Related: #311
I think I've found several bugs around type alias to record type.
Assume we have the following code:
type foo<'a> = { content: 'a }
type bar = { age: int }
type foobar = foo<bar>
let x1: foo<bar> = { content: { age: 42 } }
let x2: foobar = { content: { age: 42 } }
-
When I hover on
content
inlet x1: foo<bar> = { content: { age: 42 } }
, it shows'a
instead ofbar
.- This is kind of "correct" behavior, as it is just failing to substitute the type variable
'a
. - As a result of this, I don't get autocompletion when I enter
x1.content.
.
- This is kind of "correct" behavior, as it is just failing to substitute the type variable
-
When I hover on
content
inlet x2: foobar = { content: { age: 42 } }
, it showsfoo<'a>
instead ofbar
.- This is not correct, as
content
does not have typefoo<'a>
. - I also don't get autocompletion when I enter
x2.content.
.- This is a bit strange since if it really thinks
x2.content
has typefoo<'a>
it should providecontent
as autocompletion.
- This is a bit strange since if it really thinks
- What is interesting here is when I hover on
age
inx2.content.age
it showsint
, which is correct.
- This is not correct, as