Make target-typed new objects callable #8890
Unanswered
fandrei
asked this question in
Language Ideas
Replies: 2 comments 35 replies
-
I like this thing, but the problem is, you could only call methods that would return the exact same type of the variable. |
Beta Was this translation helpful? Give feedback.
4 replies
-
There definitely was an item requesting exactly this, and it was concluded that the complications here far outweigh the benefits. I can't find it, though. |
Beta Was this translation helpful? Give feedback.
31 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
At the current moment, it's possible to write the code like this:
However, not like this:
I think that it would be useful to make it work in the second case, too.
Beta Was this translation helpful? Give feedback.
All reactions