-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Labels
bugSomething isn't workingSomething isn't working
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
contentinlet x1: foo<bar> = { content: { age: 42 } }, it shows'ainstead 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
contentinlet x2: foobar = { content: { age: 42 } }, it showsfoo<'a>instead ofbar.- This is not correct, as
contentdoes 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.contenthas typefoo<'a>it should providecontentas autocompletion.
- This is a bit strange since if it really thinks
- What is interesting here is when I hover on
ageinx2.content.ageit showsint, which is correct.
- This is not correct, as
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working