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

PANIC at Lean.Compiler.LCNF.Simp.inlineProjInst?.visit #1822

Closed
1 task done
semorrison opened this issue Nov 14, 2022 · 0 comments
Closed
1 task done

PANIC at Lean.Compiler.LCNF.Simp.inlineProjInst?.visit #1822

semorrison opened this issue Nov 14, 2022 · 0 comments

Comments

@semorrison
Copy link
Collaborator

semorrison commented Nov 14, 2022

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Checked that your issue isn't already filed.
    • Reduced the issue to a self-contained, reproducible test case.

Description

Code below causes a PANIC

Steps to Reproduce

class F (α : Sort _) extends Inhabited α

instance : F True where
  default := trivial

example : False := by simp -- PANIC doesn't happen under `lake` unless there is an error earlier in the file.

def X (α β) [F α] : (α → β) → β :=
  fun f => f default

def Y (α : Sort _) : (True → α) → α :=
  X _ _ -- PANIC

Expected behavior: [What you expect to happen]

An error at example : False := by simp, but no panic.

Actual behavior: [What actually happens]

PANIC at Lean.Compiler.LCNF.Simp.inlineProjInst?.visit Lean.Compiler.LCNF.Simp.InlineProj:59:34: unreachable code has been reached

Versions

Lean (version 4.0.0-nightly-2022-11-10, commit 2386c40, Release)

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

No branches or pull requests

1 participant