Empty string processed by empty receiver #1843
Labels
docs: Book
/book section of the docs: Guides, Cheatsheets, and a streamlined sequence of educational materials
feature: receivers
Process internal, external, bounced incoming messages
kind: docs
Documentation for docs.tact-lang.org kept in docs folder
Milestone
In this contract:
If we send a message with an empty string (done in a spec.ts file):
the message will get processed by the empty receiver, when it should be processed by the
String
receiver, because the body has an opcode of 0 with an empty string.As a comparison, the following contract correctly catches the above message in the string receiver:
I tried sending a message to the contract inside Tact:
And again, the empty receiver processes the message.
The problem is that in the generated FunC code, the handler for the empty receiver has a
<= 32
comparison:and I think it should be strict inequality
< 32
.Additionally, the case for empty string should be added to the tests in
src/test/e2e-emulated/receiver-precedence.spec.ts
.The text was updated successfully, but these errors were encountered: