Menu

#42 Bug constant5 – hexadecimal constant read as string

open
None
5
2005-03-03
2005-02-26
No

Bug constant5 – hexadecimal constant read as string

Test input file

public class test {
public test() {
i = 0x7fff;
}
}

Test output file

<?xml version="1.0" encoding="UTF-8"?>
<package>
<classDef name="test" public="true">
<method constructor="true" name="test" public="true">
<parameterList/>
<assign operator="=">
<variable name="i"/>
<constant stringConst="0x7fff"/>
</assign>
</method>
</classDef>
</package>

Text result expected

<?xml version="1.0" encoding="UTF-8"?>
<package>
<classDef name="test" public="true">
<method constructor="true" name="test" public="true">
<parameterList/>
<assign operator="=">
<variable name="i"/>
<constant intConst="0x7fff"/>
</assign>
</method>
</classDef>
</package>

Discussion

  • Martin Baker

    Martin Baker - 2005-02-26

    test input file

     
  • Martin Baker

    Martin Baker - 2005-02-26

    Logged In: YES
    user_id=367450

    I think I made an error in expected result, I don't think we
    can set an integer attribute to 0x7fff as in:
    <constant intConst="0x7fff"/>
    I think it might need to be set to decimal equivalent:
    <constant intConst="32767"/>

     
  • Martin Baker

    Martin Baker - 2005-03-03
    • assigned_to: negocris --> martinbaker