Diff

util/promise.lua @ 9510:8ef46d09386a

util.promise: Fix promise.reject() to return a rejected promise, and fix buggy test for it
author Matthew Wild <mwild1@gmail.com>
date Thu, 18 Oct 2018 12:03:33 +0100
parent 9456:d54a0e129af8
child 9512:439cf3bbe5f3
line wrap: on
line diff
--- a/util/promise.lua	Thu Oct 18 00:49:29 2018 +0200
+++ b/util/promise.lua	Thu Oct 18 12:03:33 2018 +0100
@@ -119,7 +119,7 @@
 end
 
 local function reject(v)
-	return new(function (_reject)
+	return new(function (_, _reject)
 		_reject(v);
 	end);
 end