Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type aliases weird behavior #1227

Open
puitgfr opened this issue Jan 17, 2024 · 3 comments
Open

type aliases weird behavior #1227

puitgfr opened this issue Jan 17, 2024 · 3 comments
Labels

Comments

@puitgfr
Copy link

puitgfr commented Jan 17, 2024

Type aliases seem to be incorrectly displayed. Here is a short (working) example in codium with a type alias for natural numbers and a factorial function:
defining nat type alias and factorial function
So far, so good. Now, let's add an increment function on integers:
nat_2
Maybe I'm missing something about type aliases, but I 'd like the type annotation of incr to show int -> int.

@jfeser jfeser added the merlin label Jan 26, 2024
@PizieDust
Copy link

Okay, I just tried to replicate the above. It seems to be an issue with int aliases. I changed the type to float and incr displays the "expected" type:
image

@voodoos
Copy link
Collaborator

voodoos commented Feb 1, 2024

Okay, I just tried to replicate the above. It seems to be an issue with int aliases. I changed the type to float and incr displays the "expected" type:
image

@PizieDust you have to replace occurences of int by float on line 6 too.

This is probably due to short-path and is a Merlin issue.

@PizieDust
Copy link

@PizieDust you have to replace occurences of int by float on line 6 too.

Yes changing it to float, replicates the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants