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 authored and sbourdeauducq committed Jul 7, 2016
1 parent adcf53f commit a801cde
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
@@ -427,7 +427,7 @@ def _compute_value_type(self, object_value, object_type, object_loc, attr_name,
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, object_loc.loc)

def proxy_diagnostic(diag):
note = diagnostic.Diagnostic("note",
@@ -844,7 +844,7 @@ def _quote_function(self, function, loc):
diag = diagnostic.Diagnostic("fatal",
"this function cannot be called as an RPC", {},
self._function_loc(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 a801cde

Please sign in to comment.