Skip to content

Commit e7b86a9

Browse files
committed
Fix mypyc build
PR #6645 introduced a mypyc failure due to the irritating #3603 intersection type issue. Fix it by testing again SYMBOL_FUNCBASE_TYPES instead of FuncBase
1 parent b778c87 commit e7b86a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/checkmember.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,8 @@ def type_object_type(info: TypeInfo, builtin_type: Callable[[str], Instance]) ->
777777
return AnyType(TypeOfAny.from_error)
778778

779779
# The two is_valid_constructor() checks ensure this.
780-
assert isinstance(new_method.node, (FuncBase, Decorator))
781-
assert isinstance(init_method.node, (FuncBase, Decorator))
780+
assert isinstance(new_method.node, (SYMBOL_FUNCBASE_TYPES, Decorator))
781+
assert isinstance(init_method.node, (SYMBOL_FUNCBASE_TYPES, Decorator))
782782

783783
init_index = info.mro.index(init_method.node.info)
784784
new_index = info.mro.index(new_method.node.info)

0 commit comments

Comments
 (0)