You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a variable of type Array<T> you usually want to immediately assign it an empty array, which then can be modified and extended. This though does not work in the current version as an empty array is of type Array<any> and conflicts with any given variable:
varx: Array<nun>=[];// <- fails
Expected Behavior
The type checker should not throw a type error for an empty array assignment.
Steps To Reproduce
Write an assignment expression which assigns an empty untyped array (Array<any>) to a variable with an array type other than Array<any>
View type error in console
Environment
Kipper: 0.11.0
Environment: Node.js v18.20.4
Operating System: Arch Linux
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
I am following the documentation's guide
This issue exists in the latest version
Current Behavior
When creating a variable of type
Array<T>
you usually want to immediately assign it an empty array, which then can be modified and extended. This though does not work in the current version as an empty array is of typeArray<any>
and conflicts with any given variable:Expected Behavior
The type checker should not throw a type error for an empty array assignment.
Steps To Reproduce
Array<any>
) to a variable with an array type other thanArray<any>
Environment
The text was updated successfully, but these errors were encountered: