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

Default args for nested inductive constructors #4867

Closed
3 tasks done
JamesGallicchio opened this issue Jul 30, 2024 · 1 comment
Closed
3 tasks done

Default args for nested inductive constructors #4867

JamesGallicchio opened this issue Jul 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JamesGallicchio
Copy link
Contributor

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

For nested inductive types, any nested-inductive arguments to the constructors can't be assigned a default value.

Steps to Reproduce

inductive Foo
| mk (x : Array Foo := #[])

Expected behavior: It should compile, and Foo.mk should have a default value for x.

Actual behavior: An error is thrown:

application type mismatch
  optParam _nested.Array_1 #[]
argument has type
  Array Foo
but function has type
  _nested.Array_1 → Type

Versions

Reproduced on

  • 4.9.0-nightly-2024-05-25
  • 4.11.0-nightly-2024-07-29

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@JamesGallicchio JamesGallicchio added the bug Something isn't working label Jul 30, 2024
@Kha
Copy link
Member

Kha commented Aug 1, 2024

duplicate of #4824

@Kha Kha closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants