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

More subtyping boo boos #996

Open
danieljharvey opened this issue Jul 10, 2023 · 0 comments
Open

More subtyping boo boos #996

danieljharvey opened this issue Jul 10, 2023 · 0 comments
Labels
typechecker Making the things only do the right things

Comments

@danieljharvey
Copy link
Owner

[error]: TCCompoundTypeInEquality (TInfix (Location 179 184) OpAdd (TUnknown (Location 173 184) 1) (TLiteral (Location 183 184) (TLInt (fromList (1 :| [])))))
     ╭──▶ <repl>@12:32-12:37
     │
  12 │ def betterTest = let f = \a -> a + 1;
     •                          ┬─────┬────
     •                          │     ╰────╸
     •                          ╰──────────╸
     •                                    ╰╸
─────╯
Reading "smol-core/test/static/Prelude.smol"
[error]: TCCompoundTypeInEquality (TInfix (Location 179 184) OpAdd (TUnknown (Location 173 184) 1) (TLiteral (Location 183 184) (TLInt (fromList (1 :| [])))))
     ╭──▶ <repl>@12:32-12:37
     │
  12 │ def betterTest = let f = \a -> a + 1;
     •                          ┬─────┬────
     •                          │     ╰────╸
     •                          ╰──────────╸
     •                                    ╰╸
─────╯
Reading "smol-core/test/static/Prelude.smol"
[error]: Unification error! Expected matching types but found Nat and U1 + 1.
     ╭──▶ <repl>@1:1-1:1
     │
   1 │ def id : a -> a
     •
     • ╰╸ This has type Nat
     •
  12 │ def betterTest = let f = \a -> a + 1;
     •                                ┬────
     •                                ╰╸ This has type U1 + 1
     •
     │ Note: These two values should be of the same type
─────╯
@danieljharvey danieljharvey added the typechecker Making the things only do the right things label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typechecker Making the things only do the right things
Projects
None yet
Development

No branches or pull requests

1 participant