Fix type errors
This commit is contained in:
@@ -521,6 +521,8 @@ class Macros {
|
|||||||
var bindingList = exps[1].bindingList("defnew");
|
var bindingList = exps[1].bindingList("defnew");
|
||||||
var bindingPairs = Prelude.groups(bindingList, 2);
|
var bindingPairs = Prelude.groups(bindingList, 2);
|
||||||
|
|
||||||
|
// TODO allow &prop in the arg list to bind it directly to a same-named variable
|
||||||
|
|
||||||
var b = wholeExp.expBuilder();
|
var b = wholeExp.expBuilder();
|
||||||
var propertyDefs = [for (bindingPair in bindingPairs) b.call(b.symbol("defprop"), [bindingPair[0]])];
|
var propertyDefs = [for (bindingPair in bindingPairs) b.call(b.symbol("defprop"), [bindingPair[0]])];
|
||||||
var propertySetExps = [for (bindingPair in bindingPairs)
|
var propertySetExps = [for (bindingPair in bindingPairs)
|
||||||
|
@@ -1,13 +1,15 @@
|
|||||||
(defnew [:String title
|
(defnew [title
|
||||||
:Int width
|
width
|
||||||
:Int height
|
height
|
||||||
:Int letterWidth
|
letterWidth
|
||||||
:Int letterHeight
|
letterHeight
|
||||||
:GameLogic gameLogic
|
_gameLogic
|
||||||
:GraphicsBackend _graphicsBackend]
|
_graphicsBackend]
|
||||||
[graphics (new Graphics width height)
|
|
||||||
logic gameLogic
|
// TODO the type annotation on this line feels like a bit much, but is necessary:
|
||||||
graphicsBackend _graphicsBackend]
|
[:Graphics graphics (new Graphics width height)
|
||||||
|
:GameLogic gameLogic _gameLogic
|
||||||
|
:GraphicsBackend graphicsBackend _graphicsBackend]
|
||||||
|
|
||||||
(graphicsBackend.initialize title width height letterWidth letterHeight))
|
(graphicsBackend.initialize title width height letterWidth letterHeight))
|
||||||
|
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
(defnew [width height]
|
(defnew [width height]
|
||||||
[surface (new Surface width height)])
|
[:Surface surface (new Surface width height)])
|
Reference in New Issue
Block a user