mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
Resolve: * resolve to the first implementation in class, if there is no implementation, resolve to the first overload * resolve to the last implementation in module, if there is no implementation, resolve to the last overload
19 lines
265 B
Python
19 lines
265 B
Python
from typing import overload
|
|
|
|
|
|
class A:
|
|
@overload
|
|
def foo(self, value: None) -> None:
|
|
pass
|
|
|
|
@overload
|
|
def foo(self, value: int) -> str:
|
|
pass
|
|
|
|
@overload
|
|
def foo(self, value: str) -> str:
|
|
pass
|
|
|
|
|
|
A().foo("abc")
|
|
<ref> |