MVCoconut / coconut.data

Observable Data Layer.
The Unlicense
20 stars 8 forks source link

commit a3f93e brings error in coconut/data/macros/ModelBuilder.hx:184 Cannot use Void as value #69

Closed grepsuzette closed 4 years ago

grepsuzette commented 4 years ago

From a3f93e till HEAD (before it works fine, at least from 70d83, that is from release 0.10.1). Now get this error in my app, with both Haxe 4.0.5, 4.1.2 (and even 4.1.3):

haxe/haxe_libraries/coconut.data/0.10.1/
github/951b6ca458348ef9783cc2cb645ed10fffaa3b74/src/coconut/data/macros/ModelBuilder.hx:184: 
characters 33-91 : Cannot use Void as value

The patch introduced by this commit (incidentally, also where error is reported, ModelBuilder.hx:184) is just:

-    constr.addStatement(macro tink.state.Observable.auto(function () $b{afterInit}));
+    if (afterInit.length > 0)
+      constr.addStatement(macro tink.state.Observable.untracked(function () $b{afterInit}));

So untracked vs auto

I first upgraded to latest versions of tink and coconut libs, so I hope it's just a small bug that remains.