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

Matching on Object should not match the Initial Fact #164

Open
markbjerke opened this issue Dec 17, 2015 · 2 comments
Open

Matching on Object should not match the Initial Fact #164

markbjerke opened this issue Dec 17, 2015 · 2 comments
Labels

Comments

@markbjerke
Copy link

If you have a constraint that simply matches on Object, it should not match the initial fact.

@DevSide
Copy link
Collaborator

DevSide commented Oct 5, 2016

You are right,

rule matchInitialFact {
    when  {
        initialFact: Object
    }
    then {
        console.log(initialFact);
    }
}

@DevSide DevSide added the bug label Oct 5, 2016
@DevSide DevSide added this to the v0.4.3 milestone Oct 5, 2016
@DevSide
Copy link
Collaborator

DevSide commented Oct 15, 2016

exists(o:Object) matches as well. I took a look and it's kind of tricky.
Object type matches every other types (String, Number, ...), so every facts.
Not sure it's a good pratice to use Object instead of our own parent class.
We can maybe throw an error and don't get a instable behaviour ?

@DevSide DevSide removed this from the v0.4.3 milestone Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants