forked from M-Labs/artiq
1
0
Fork 0

embedding: fix location for diagnostics on quoted values.

Fixes #489.
This commit is contained in:
whitequark 2016-07-07 17:00:48 +08:00 committed by Sebastien Bourdeauducq
parent adcf53f1cb
commit a801cde953
1 changed files with 2 additions and 2 deletions

View File

@ -427,7 +427,7 @@ class StitchingInferencer(Inferencer):
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 @@ class Stitcher:
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