Last active
December 30, 2019 18:53
-
-
Save kunigami/91cb65de62cef78b5a3e465019bd5579 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def dummy(x: object) -> object: | |
return x | |
def inc(x: int) -> int: | |
return x + 1 | |
dummy(Square()) # ok | |
inc(dummy(1)) # error - dummy(1) returns object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment