It should not be possible to create infinite datatypes #48
Labels
No labels
blocked
blocker
bug
c
codegen
dependencies
discussion
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
javascript
lexer/parser
llvm
macroexpander
performance
priority:high
priority:low
priority:normal
question
triage
typechecker
webassembly
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: samvv/bolt#48
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Consider the following definition:
Here, the recursive call to
List a
is wrapped in aPair
, which makes everything OK.Imagine now the following type:
Here, the datatype is clearly invalid because to instantiate it you would need an infinite sequence of
Ref
s.The compiler needs a check to prevent this from happening.