2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-26 11:48:27 +08:00

compiler: skip kernel_invariant linting for exception types.

This commit is contained in:
whitequark 2016-09-14 23:34:57 +00:00 committed by Robert Jordens
parent ecb01d055f
commit 6f2125258c

View File

@ -740,6 +740,10 @@ class Stitcher:
# specifications refers to ones we didn't encounter. # specifications refers to ones we didn't encounter.
for host_type in self.embedding_map.type_map: for host_type in self.embedding_map.type_map:
instance_type, constructor_type = self.embedding_map.type_map[host_type] instance_type, constructor_type = self.embedding_map.type_map[host_type]
if not hasattr(instance_type, "constant_attributes"):
# Exceptions lack user-definable attributes.
continue
for attribute in instance_type.constant_attributes: for attribute in instance_type.constant_attributes:
if attribute in instance_type.attributes: if attribute in instance_type.attributes:
# Fast path; if the ARTIQ Python type has the attribute, then every observed # Fast path; if the ARTIQ Python type has the attribute, then every observed