Skip to content

negative operation not recognized #18

@HaSa1002

Description

@HaSa1002

Version: 0.7-dev (Last Build 2021-01-28 01:30)

Description of the problem:
Negative operations such as -42 are not correctly handled.
Steps to reproduce:
See code.
Code:

Source Code
func _ready():
    var f = File.new()
    f.store_16(-42) # This wraps around and stores 65494 (2^16 - 42).
Output
[codeblocks]
[gdscript]
func _ready():
    var f = File.new()
    f.store_16(-42) # This wraps around and stores 65494 (2^16 - 42).
[/gdscript]
[csharp]
public override void _Ready()
{
    var f = new File();
    f.Store16() - 42); // This wraps around and stores 65494 (2^16 - 42).
}
[/csharp]
[/codeblocks]
Expected Output
public override void _Ready()
{
    var f = new File();
    f.Store16(-42); // This wraps around and stores 65494 (2^16 - 42).
}
Warnings
[1] No return value provided. Assuming void. Use -> RETVAL to specify
[3] If constant is enum refer to documentation for correct syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions