Skip to content

Partially fix #1500: Implicit search breaks at a certain depth #1504

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

Merged
merged 1 commit into from
Sep 14, 2016

Conversation

OlivierBlanvillain
Copy link
Contributor

The issue fixed here was introduced by 71027f1. The added csyms.isEmpty condition on case nil => is always true, which is clearely a bug.

t1500c still fails with covariant (or contravariant) type parameters on ::, but this seams to be a more complicated issue involving the typer.

@OlivierBlanvillain
Copy link
Contributor Author

@smarter could you have a look?


object NatTest {
def main(args: Array[String]): Unit = {
assert(implicitly[ToInt[Zero]].value == 0)
Copy link
Member

Choose a reason for hiding this comment

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

If you want your assertions to actually be executed, you should put that test in tests/run/, not tests/pos/

@smarter
Copy link
Member

smarter commented Sep 12, 2016

Otherwise LGTM.

implicit def caseSucc[Prev <: Nat](implicit e: ToInt[Prev]): ToInt[Succ[Prev]] = ToInt(e.value + 1)
}

object NatTest {
Copy link
Member

Choose a reason for hiding this comment

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

Oops, I forgot to mention that your main class should be called Test to be run.

The issue fixed here was introduced by 71027f1. The added `csyms.isEmpty` condition on `case nil =>` is always true, which is clearely a bug.

t1500c still fails with covariant (or contravariant) type parameters on `::`, but this seams to be a more complicated issue involving the typer.
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.

3 participants