Replies: 4 comments
-
I've long thought that "dynamic" should be a variable modifier that would do something similar to what you indicated. For example: dynamic foo = SomeMethod(...); ///We can do this today |
Beta Was this translation helpful? Give feedback.
-
As a related thought: dotnet/roslyn/#5306 is also looking for some compile time enforcement of |
Beta Was this translation helpful? Give feedback.
-
Hi All, Perhaps we should just allow listing multiple types to create intersection types. For example, here are a bunch of declarations:
|
Beta Was this translation helpful? Give feedback.
-
@TonyValenti There are proposal about union and intersect type #344 #399 which is the same as typescript approach Also I prefer using CompoundType = (TU1 | TU2) & TI1;
dynamic<CompoundType> obj = ...; |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Original: dotnet/roslyn/#3012
The generic type syntax could be used with
dynamic
asdynamic<T>
to give tooling support about members and operators related to the usage of the variable.This tooling could include:
Beta Was this translation helpful? Give feedback.
All reactions