Subtraction error without a specific line
Getting errors like
ligo compile-contract contract.mligo main
ligo: error
Invalid subtraction.
The following forms of subtractions are possible:
* timestamp - int = timestamp
* timestamp - timestamp = int
* int/nat - int/nat = int
* mutez/tez - mutez/tez = mutez.
If you're not sure how to fix this error, you can do one of the following:
* Visit our documentation: https://ligolang.org/docs/intro/introduction
* Ask a question on our Discord: https://discord.gg/9rhYaEt
* Open a gitlab issue: https://gitlab.com/ligolang/ligo/issues/new
* Check the changelog by running 'ligo changelog'
I know what's going on, I have x of type {foo : int}
and y of type int
and I'm writing x - y
instead of x.foo - y
. The problem is I don't know where that happens in my code, and the ligo compiler doesn't tell me.
ligo --version
Rolling release
Commit SHA: 7a0b0bc77c030039f28fd3ee20361c32632f683a
Commit Date: 2020-08-20 14:57:59 +0000