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

vscode datalog: "missing attribute" problems missing #393

Open
vilterp opened this issue Jun 20, 2023 · 0 comments
Open

vscode datalog: "missing attribute" problems missing #393

vilterp opened this issue Jun 20, 2023 · 0 comments
Labels

Comments

@vilterp
Copy link
Owner

vilterp commented Jun 20, 2023

We should be seeing an error here, since bar has no attribute y:

foo{x: A} :-
  bar{y: A}.
bar{z: B} :-
  baz{boop: B}.

This seems not to be working… Defined here:

function* tcNonexistentAttr(db: NodesByRule): Generator<Problem> {
for (const ruleID in db.get("rule").byID) {
for (const attr of scopeVarAttr(db, ruleID)) {
if (generatorIsEmpty(tcRuleAttr(db, attr.scopeID, attr.name))) {
for (const ruleName of ruleIDToName(db, attr.scopeID)) {
yield {
desc: `nonexistent attr \`${attr.name}\` calling rule \`${ruleName}\``,
span: attr.span,
};
}
}
}
}
}

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

1 participant