Skip to content

Comparing between variables having a string is failed.  #237

@Kray-G

Description

@Kray-G

Here is an example to be failed.

function gt(a, b)  { return a > b; }
function lt(a, b)  { return a < b; }
function ge(a, b)  { return a >= b; }
function le(a, b)  { return a <= b; }
function lge(a, b) { return a <=> b; } // will be successful.
try { gt("a", "b");  } catch (e) { System.println(e.what()); }
try { lt("a", "b");  } catch (e) { System.println(e.what()); }
try { ge("a", "b");  } catch (e) { System.println(e.what()); }
try { le("a", "b");  } catch (e) { System.println(e.what()); }
try { lge("a", "b"); } catch (e) { System.println(e.what()); } // nothing's displayed.

It is okay when comparing two strings directly.

System.println("a" > "b");

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions