mirror of https://github.com/m-labs/artiq.git
compiler.embedding: default RPC return annotation is -> TNone.
This commit is contained in:
parent
c9d8fd837e
commit
995245b786
|
@ -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", {},
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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()
|
Loading…
Reference in New Issue