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
This one was a little hard to understand what was going on.
If I print something (e.g. with println) inside a defmacro (and the macro compilation is for a deftype (but it may occur for other cases)), the STDOUT goes to the generated code.
✗ dart run
Building package executable...
Failed to build dartapp:dartapp:
lib/cljd-out/quickstart/helloworld.dart:16:1: Error: Expected an identifier, but got '('.
Try inserting an identifier before '('.
(1 + 4)
^
The generated code is something like
... imports ...
// BEGIN SciVarclassSciVarextends dc.Object {
constSciVar():super();
(1+4) // <-- _O_ !!!!!!!!!!!!!!!!!!!!!
dc.StringtoString(){
returntrue;
}
}
// END SciVar// BEGIN instance?
dc.dynamicinstance$QMARK_(dc.dynamic$AMPERSAND_form$1, dc.dynamic$AMPERSAND_env$1, ){
final dc.List<dc.dynamic> fl$1=(dc.List<dc.dynamic>.filled(3, 1, ));
fl$1[1]=(Upfddlcoc_core.symbol.$_invoke$2(null, "+", ));
fl$1[2]=4;
finalUpfddlcoc_core.PersistentList $1=Upfddlcoc_core.$_list_lit(fl$1, );
return (Upfddlcoc_core.println.$_invoke$1($1, ));
}
// END instance?
The text was updated successfully, but these errors were encountered:
This one was a little hard to understand what was going on.
If I print something (e.g. with
println
) inside adefmacro
(and the macro compilation is for adeftype
(but it may occur for other cases)), the STDOUT goes to the generated code.throws
The generated code is something like
The text was updated successfully, but these errors were encountered: