Skip to content

Commit

Permalink
embedding: fix location for diagnostics on quoted values.
Browse files Browse the repository at this point in the history
Fixes #489.
whitequark committed Jul 7, 2016
1 parent c065b58 commit 373578b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions artiq/compiler/embedding.py
Original file line number Diff line number Diff line change
@@ -558,7 +558,7 @@ def _compute_attr_type(self, object_value, object_type, object_loc, attr_name, l
if attr_value_type is None:
# Slow path. We don't know what exactly is the attribute value,
# so we quote it only for the error message that may possibly result.
ast = self.quote(attr_value, object_loc.expanded_from)
ast = self.quote(attr_value, loc)

def proxy_diagnostic(diag):
note = diagnostic.Diagnostic("note",
@@ -981,7 +981,7 @@ def _quote_function(self, function, loc):
diag = diagnostic.Diagnostic("fatal",
"this function cannot be called as an RPC", {},
self._function_loc(host_function),
notes=self._call_site_note(loc, is_syscall=True))
notes=self._call_site_note(loc, is_syscall=False))
self.engine.process(diag)
else:
assert False

0 comments on commit 373578b

Please sign in to comment.