asdeqpaul
(Paul Stevenson)
1
looks like it’s confused about a generic?
Fire 2211
let promise = Promise<NoParams>()
blah.abc(
onSuccess:
{
print("blah")
promise.resolve(NoParams.instance). //////////////<<<<<<
},
onFail:
on the marked line I get
Type mismatch, expected “Promise”
which is what I thought it was
all the text is selected for the error
asdeqpaul
(Paul Stevenson)
2
oh… I think this is just a weird message…
and it’s actually a byproduct of an error further up.
this can be closed.
1 Like
mh
(marc hoffman)
3
If you think the error reporting is bad, i’d still love to get a testcase so we can improve this.
thanx,
marc
asdeqpaul
(Paul Stevenson)
4
public class ABC
{
private var xxx: XXX? // where XXX is NOT defined anywhere…
public func abc() -> Promise<NoParams>
{
let promise = Promise<NoParams>()
xxx?.initialise(
onSuccess:
{
promise.resolve(NoParams.instance)
},
onFail:
{
promise.reject(PromiseError("VSE failed to initialise"))
})
return promise
}
}