diff options
Diffstat (limited to 'lib9p/idl/__init__.py')
-rw-r--r-- | lib9p/idl/__init__.py | 6 |
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") |