Skip to content

Commit 373578b

Browse files
author
whitequark
committedJul 7, 2016
embedding: fix location for diagnostics on quoted values.
Fixes #489.
1 parent c065b58 commit 373578b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎artiq/compiler/embedding.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ def _compute_attr_type(self, object_value, object_type, object_loc, attr_name, l
558558
if attr_value_type is None:
559559
# Slow path. We don't know what exactly is the attribute value,
560560
# so we quote it only for the error message that may possibly result.
561-
ast = self.quote(attr_value, object_loc.expanded_from)
561+
ast = self.quote(attr_value, loc)
562562

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

0 commit comments

Comments
 (0)
Please sign in to comment.