From 373578bc02cb148c6f06812eec9526063cb5a2a5 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 7 Jul 2016 06:55:21 +0000 Subject: [PATCH] embedding: fix location for diagnostics on quoted values. Fixes #489. --- artiq/compiler/embedding.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/compiler/embedding.py b/artiq/compiler/embedding.py index 7b4806223..0d35e63df 100644 --- a/artiq/compiler/embedding.py +++ b/artiq/compiler/embedding.py @@ -558,7 +558,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, loc) def proxy_diagnostic(diag): note = diagnostic.Diagnostic("note", @@ -981,7 +981,7 @@ class Stitcher: 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