namespace Test\BuiltIn;

class CharMethods
{
    public function getHex()
    {
        return 'a'->toHex();
    }

    public function getHexForString(string str)
    {
        var o = "", n;
        char ch;

        for ch in str {
            let o .= ch->toHex();
        }
        return o;
    }
}

Remove unused variable n in Test\BuiltIn\CharMethods::getHexForString
namespace Test\BuiltIn;

class CharMethods
{
    public function getHex()
    {
        return 'a'->toHex();
    }

    public function getHexForString(string str)
    {
        var o = "";
        char ch;

        for ch in str {
            let o .= ch->toHex();
        }
        return o;
    }
}