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

[direct] improve error messages + test coverage #985

Merged
merged 3 commits into from
Jan 9, 2025
Merged

Conversation

fwbrasil
Copy link
Collaborator

@fwbrasil fwbrasil commented Jan 8, 2025

No description provided.

@@ -47,97 +82,52 @@ private[kyo] object Validate:
|""".stripMargin
)

case tree @ Apply(TypeApply(Ident("defer"), _), _) =>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This case was unnecessary. The error message for a missing now triggers first

|• TRef and derivatives (kyo-stm)""".stripMargin
)

case Return(_, _) =>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also unnecessary, it's not possible to have a return outside of def

|}""".stripMargin)}""".stripMargin
)

case Lambda(_, body) if !pure(body) =>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This pattern match is wrong and I couldn't make it work. I've decided to remove because dotty-cps-async already produces an error message for this.

@@ -0,0 +1,195 @@
package kyo
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've removed DirectTest and replaced it with more complete PreludeTest and CoreTest suites

}
}

// TODO Compiler crash because `Queue` is an opaque type without a type bound
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't use pendingUntilFixed because the compiler crashes. I'll create an issue for this

}
}

// TODO Compiler crash because `Queue` is an opaque type without a type bound
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same issue

@fwbrasil fwbrasil merged commit e2e40b2 into main Jan 9, 2025
3 checks passed
@fwbrasil fwbrasil deleted the direct-improvements branch January 9, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants