-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Is your feature request related to a problem?
Sometimes we want to mark a parameter in the stubs as optional, but don't know its exact default value or cannot express it in the language. Here, the exact default values are only provided for documentation anyway.
A possible solution is to make the type nullable and use null as the default value. This, however, also means that the library must accept null there. Moreover, it allows passing null explicitly, which is often not desired.
Desired solution
- Add a new literal expression
unknown. - Add a check that this must only be used as the default value of parameters of stubs declarations.
- Compute its type as
Nothing. - In the partial evaluator, it should lead to
UnknownValueif it occurs in the computation.
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
releasedIncluded in a releaseIncluded in a release
Type
Projects
Status
✔️ Done