Ludii Forum
Add these compiler errors - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Ludii Player Problems (https://ludii.games/forums/forumdisplay.php?fid=6)
+--- Thread: Add these compiler errors (/showthread.php?tid=346)



Add these compiler errors - dale walton - 12-23-2020

This is a thread for listing things that I found cause compiler errors without messages.  I will add them as I find them to remember what to check for, and in the hopes in the future they can be checked.

1)  (addScore (mover) 1) doesn't compile;  (addScore (player (mover)) 1) does.


RE: Add these compiler errors - Eric Piette - 01-04-2021

Hi,

That's a compiler error.
The (player ....) is not an IntFunction but a ludeme used to encapsulate a player concept here.
Consequently that ludeme just does not except a IntFunction to specify the player but a (player ...) ludeme.

However before the holidays we discussed with Cameron about an idea to return more detailed errors from the compiler.
I am not sure when we look more closely about that but when we will do it, you should be able to see automatically in which ludeme which parameter is wrong for the compiler.

Regards,
Eric


RE: Add these compiler errors - dale walton - 01-05-2021

Yea! that would be great.

I know its probably a lot of work, but for those not yet on the learning curve it could make a big difference.
It will also possibly help in us identifying bugs the compiler doesn't yet see.