Skip to content

Type Selection #219

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

Closed
wants to merge 2 commits into from
Closed

Type Selection #219

wants to merge 2 commits into from

Conversation

Meowcolm024
Copy link
Collaborator

@Meowcolm024 Meowcolm024 commented Apr 9, 2024

Note: part of #195

Changes:

  • Parsing
    • type member declaration with bounds Foo[type A extends L restricts U]
    • type selection x.A
    • as operator
    • wildcard type ?
  • Type checking:
    • type selection typing

@Meowcolm024 Meowcolm024 requested a review from LPTK April 9, 2024 10:53
@Meowcolm024
Copy link
Collaborator Author

Not included in this PR:

  • pushing type alias member to type members i.e. class Foo { type T }

Copy link
Contributor

@LPTK LPTK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that I have old review comments pending that I never submitted; releasing them now.

@@ -28,7 +28,7 @@ abstract class Test[C] {
// * Represents what happens in "... ${input} ..." when a binding of C is in scope
fun unquote: (input: Code['a, C | 'c]) -> Code[Int, 'c]
fun getVar: Code[Int, C]
fun test0 = this.unquote of IntLit(1)
fun test0 = this.unquote of (IntLit(1) : Code['ia, 'ic]) // ? why ascription works here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the weird change?

//│ class C(x: Int, y: Str)


:d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug trace left here...

@LPTK
Copy link
Contributor

LPTK commented Jan 21, 2025

Thanks for the great work!

However, as you know, we've moved to a new version of the compiler, which will have a brand new type checker implementation. So while your PR is useful for future reference when we reimplement similar features in the new compiler (I will add a tag to that effect), it's probably not worth fixing the merge conflicts with the old type checker.

@LPTK LPTK closed this Jan 21, 2025
@LPTK LPTK mentioned this pull request Jan 21, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants