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
package;
class Main
{
static function main() { new Main(); }
function new() {
var v = Main.frand();
}
inline public static function frand(?rnd:Void->Float):Float
{
return
if ( rnd == null )
Math.random();
else
rnd();
}
}
Error:
Error: ./src/Main.cpp:24:7: error: type 'null' does not provide a call operator
v = null()().Cast< Float >();
^~~~~~
./src/Main.cpp:24:22: error: unexpected type name 'Float': expected expression
v = null()().Cast< Float >();
^
./src/Main.cpp:24:30: error: expected expression
v = null()().Cast< Float >();
The text was updated successfully, but these errors were encountered:
package;
class Main
{
static function main() { new Main(); }
}
Error:
Error: ./src/Main.cpp:24:7: error: type 'null' does not provide a call operator
v = null()().Cast< Float >();
^~~~~~
./src/Main.cpp:24:22: error: unexpected type name 'Float': expected expression
v = null()().Cast< Float >();
^
./src/Main.cpp:24:30: error: expected expression
v = null()().Cast< Float >();
The text was updated successfully, but these errors were encountered: