diff --git a/artiq/compiler/embedding.py b/artiq/compiler/embedding.py index 763accb20..89bdf8f51 100644 --- a/artiq/compiler/embedding.py +++ b/artiq/compiler/embedding.py @@ -595,12 +595,7 @@ class Stitcher: ret_type = self._extract_annot(function, signature.return_annotation, "return type", loc, is_syscall=syscall is not None) elif syscall is None: - diag = diagnostic.Diagnostic("error", - "function must have a return type annotation to be called remotely", {}, - self._function_loc(function), - notes=self._call_site_note(loc, is_syscall=False)) - self.engine.process(diag) - ret_type = types.TVar() + ret_type = builtins.TNone() else: # syscall is not None diag = diagnostic.Diagnostic("error", "system call must have a return type annotation", {}, diff --git a/artiq/test/coredevice/embedding.py b/artiq/test/coredevice/embedding.py index c5ce1a2d4..111f40485 100644 --- a/artiq/test/coredevice/embedding.py +++ b/artiq/test/coredevice/embedding.py @@ -12,7 +12,7 @@ class Roundtrip(EnvExperiment): class RoundtripTest(ExperimentCase): def assertRoundtrip(self, obj): exp = self.create(Roundtrip) - def callback(objcopy) -> TNone: + def callback(objcopy): self.assertEqual(obj, objcopy) exp.roundtrip(obj, callback) diff --git a/lit-test/test/embedding/error_rpc_return.py b/lit-test/test/embedding/error_rpc_return.py deleted file mode 100644 index f3f8ddd70..000000000 --- a/lit-test/test/embedding/error_rpc_return.py +++ /dev/null @@ -1,14 +0,0 @@ -# RUN: %python -m artiq.compiler.testbench.embedding %s >%t -# RUN: OutputCheck %s --file-to-check=%t - -from artiq.language.core import * -from artiq.language.types import * - -# CHECK-L: ${LINE:+1}: error: function must have a return type annotation to be called remotely -def foo(): - pass - -@kernel -def entrypoint(): - # CHECK-L: ${LINE:+1}: note: in function called remotely here - foo()