Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird results of comparison of non-numeric types with <, > and similar operators. #2009

Closed
seven-phases-max opened this issue May 14, 2014 · 2 comments

Comments

@seven-phases-max
Copy link
Member

(this is more like a self-note that the comparison subsystem probably needs some not-so-minor refactoring).
Example:

.test {
    & when (two < 1) {
        1: true;
    }

    & when (a > b) {
        2: true;
    }

    @v: whatever complex "thing", 3;
    & when (@v < ~"3") {
        3: true;
    }

    & when (#fff < #000) {
        4: true;
    }

    // etc.
}

Result:

.test {
  1: true;
  2: true;
  3: true;
  4: true;
}

Expected result: error? false?

Related issues: #1725 (comment)

@seven-phases-max seven-phases-max changed the title Weird results of comparision of different types with <, > and similar operators. Weird results of comparision of non-numeric types with <, > and similar operators. May 14, 2014
@seven-phases-max seven-phases-max changed the title Weird results of comparision of non-numeric types with <, > and similar operators. Weird results of comparison of non-numeric types with <, > and similar operators. May 14, 2014
@lukeapage
Copy link
Member

Yes, ive noticed this before. My vote is it should return false. The
current line is that a mixin should use the is functions if doing a <, >
comparison.

@seven-phases-max
Copy link
Member Author

Closing as fixed in v2. All return false now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants