summaryrefslogtreecommitdiff
path: root/lib9p/idl/__init__.py
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-01-27 21:38:15 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-01-27 21:38:15 -0700
commitf7b7c04e2ebb24ccae89b77ce76f0b405eb213d1 (patch)
tree87f743d15943f47bb55f0a675877b9f7f42e4597 /lib9p/idl/__init__.py
parentfbc408b36495a60aaf87f5e368a11f57f246d023 (diff)
parent508730301701ece981149f18bc515797cf2b9990 (diff)
Merge branch 'lukeshu/misc'
Diffstat (limited to 'lib9p/idl/__init__.py')
-rw-r--r--lib9p/idl/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib9p/idl/__init__.py b/lib9p/idl/__init__.py
index fec6c41..41664f1 100644
--- a/lib9p/idl/__init__.py
+++ b/lib9p/idl/__init__.py
@@ -449,8 +449,10 @@ def parse_file(
other_version, other_typs = get_include(m.group("file"))
for symname in m.group("syms").split(sep=","):
symname = symname.strip()
+ found = False
for typ in other_typs:
if typ.name == symname or symname == "*":
+ found = True
match typ:
case Primitive():
pass
@@ -467,6 +469,10 @@ def parse_file(
if other_version in member.in_versions:
member.in_versions.add(version)
env[typ.name] = typ
+ if symname != "*" and not found:
+ raise ValueError(
+ f"import: {m.group('file')}: no symbol {repr(symname)}"
+ )
elif m := re.fullmatch(re_line_num, line):
num = Number()
num.name = m.group("name")