Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Summary
I can not concat two arrays.
If i do this, i get an error:
set TestArray = TestArray + array{Promise}
Error:
This assignment expects a value of type []promise(any,any), but the assigned value is an incompatible value of type []any.(3509)
If i do this, i see no error, but my Server crashes.
set TestArray += array{Promise}
Steps to Reproduce
promise_base := class<abstract>(invalidatable):
var<private> Disposed: logic = false
Dispose<override>(): void =
set Disposed = true
IsValid<override>()<decides><transacts>: void =
not Disposed?
NoFunction(:any): void = ()
promise<public>(captured_args: type, req_args: type) := class(promise_base):
ResolveFunction<public>:type{_(:captured_args, :req_args): void}
RejectFunction<public>:type{_(:captured_args, :req_args): void} = NoFunction
Args<public>:captured_args
Resolve(InArgs: req_args): void =
if (IsValid[]):
Dispose()
ResolveFunction(Args, InArgs)
Reject(InArgs: req_args): void =
if (IsValid[]):
Dispose()
RejectFunction(Args, InArgs)
TestFunc(Promise: promise(any, any)): void =
var TestArray: []promise(any, any) = array{}
set TestArray = TestArray + array{Promise}
#Error: This assignment expects a value of type []promise(any,any), but the assigned value is an incompatible value of type []any.(3509)
Expected Result
It should work.
Observed Result
Verse being Verse.
Platform(s)
All
3 posts - 3 participants