ton-blockchain / intellij-ton

TON Development plugin for the IntelliJ Platform
https://plugins.jetbrains.com/plugin/23382-ton
GNU General Public License v3.0
66 stars 8 forks source link

Negative method IDs are considered a syntax error #157

Closed Skydev0h closed 3 months ago

Skydev0h commented 5 months ago

The extension considers that negative method IDs are invalid, while, in reality, they are perfectly valid (although special care should be taken when using them, but using large negative method IDs might be beneficial for special methods, that may be even internally preprocessed, for example, to avoid conflicts with getters and ordinary methods).

image

While the actual usage of negative method IDs is pretty controversial, I think that they should be supported, because they are happily processed by the FunC compiler without any warning or error.

andreypfau commented 5 months ago

I think we need to add a warning inspection about negative values in the decimal number form for method_id with the possibility of hotfix conversion to HEX values.

andreypfau commented 3 months ago

Fixed in 2.1.0