mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
fix: Handle aliases in scheduler (#285)
Earlier scheduler only recognized rules and would raise an `unsafe var` error on alias. Register alias var names to fix this. fixes #284 Also fix clippy warning treated as error Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
6e1f8cdb36
commit
7095e269b7
@@ -34,6 +34,7 @@ cases:
|
||||
|
||||
- |
|
||||
package b
|
||||
import rego.v1
|
||||
# Both the following imports are overridden by rules
|
||||
#import data.a.b as a
|
||||
#import data.a.b
|
||||
@@ -43,6 +44,10 @@ cases:
|
||||
|
||||
a = 10
|
||||
c = C + b
|
||||
|
||||
r if {
|
||||
some v in [C]
|
||||
}
|
||||
query: data
|
||||
want_result:
|
||||
a:
|
||||
@@ -50,6 +55,7 @@ cases:
|
||||
b:
|
||||
a: 10
|
||||
c: 22
|
||||
r: true
|
||||
|
||||
- note: import overridden by rule
|
||||
modules:
|
||||
|
||||
Reference in New Issue
Block a user