Skip to content

error messages: external with non-syntactic arity#14146

Merged
Octachron merged 1 commit intoocaml:trunkfrom
Octachron:infinite_external
Jul 17, 2025
Merged

error messages: external with non-syntactic arity#14146
Octachron merged 1 commit intoocaml:trunkfrom
Octachron:infinite_external

Conversation

@Octachron
Copy link
Copy Markdown
Member

Currently, declaring an external with a non-syntactic arity:

external x: (int -> int as 'a) -> 'a = "%identity"

triggers an assert false in Typedecl. This PR proposes to emit a normal error message:

Error: This external declaration has a non-syntactic arity,
       its arity is greater than its syntatic arity.

Copy link
Copy Markdown
Member

@gasche gasche left a comment

Choose a reason for hiding this comment

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

Obviously correct, thanks!

@Octachron Octachron force-pushed the infinite_external branch from 33f771e to 36ddb17 Compare July 16, 2025 14:16
@samsa1
Copy link
Copy Markdown
Contributor

samsa1 commented Jul 17, 2025

LGTM

Bookkeeping for myself : This fix will also need to be ported to #13275

@Octachron Octachron merged commit 82b96de into ocaml:trunk Jul 17, 2025
24 checks passed
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