You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using tink_lang 0.6.4, the below code compiles but doesn't work as expected.
The constructor generated by tink_lang takes event from the constructor param, and creates a new _event signal trigger, because of the partial implementation in the interface.
With tink_lang 0.7.0, the below code doesn't compile (which is better than compiling to code that doesn't behave as expected).
If not too tricky, it would be nice if the generated code would take the _event signal trigger from the constructor param, and init the event from it, as normally happens when using the @:signal syntax.
package;
usingtink.CoreApi;
classTest {
staticfunctionmain() {
finaltrigger:SignalTrigger<Noise> =Signal.trigger();
trigger.asSignal().handle(_->trace("Mischief managed"));
newEmitter(trigger).emit();
}
}
@:tinkclassEmitterimplementsIEmitter {
//*
@:signalvarevent:Noise=_;
/*/ public var _event:SignalTrigger<Noise> = _; public var event(get, null):Signal<Noise>; inline function get_event() return _event.asSignal(); //*/publicfunctionemit() _event.trigger(Noise);
}
@:tinkinterfaceIEmitter {
@:signalvarevent:Noise;
}
Using tink_lang 0.6.4, the below code compiles but doesn't work as expected.
The constructor generated by tink_lang takes
event
from the constructor param, and creates a new_event
signal trigger, because of the partial implementation in the interface.With tink_lang 0.7.0, the below code doesn't compile (which is better than compiling to code that doesn't behave as expected).
If not too tricky, it would be nice if the generated code would take the
_event
signal trigger from the constructor param, and init theevent
from it, as normally happens when using the@:signal
syntax.The text was updated successfully, but these errors were encountered: