Skip to content

Commit 4fde6f9

Browse files
committed
Fix error string
1 parent 689c446 commit 4fde6f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypyc/irbuild/prepare.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ def check_value_type(
150150
) -> None:
151151
if not is_immutable(cdef) or not cdef.info.is_final:
152152
module = module_by_fullname.get(cdef.info.module_name)
153+
path = module.path if module else ""
153154
# Because the value type have semantic differences we can not just ignore it
154-
errors.error("Value types must be immutable and final", module.path, cdef.line)
155+
errors.error("Value types must be immutable and final", path, cdef.line)
155156

156157
for mtd_name in (
157158
"__iter__",

0 commit comments

Comments
 (0)