assert List of int is typeof(List).MakeGenericType(int)
assert typeof(List of int) is List of int
assert List of int is typeof(Foo).GetMethod("bar").ReturnType
Description
class Foo:
def bar() as List of int:
pass
assert List of int is typeof(List).MakeGenericType(int)
assert typeof(List of int) is List of int
assert List of int is typeof(Foo).GetMethod("bar").ReturnType
I think the first assertion is problematic. In C#, one would write:
Assert(List<int> == typeof(List<>).MakeGenericType(int))
and not:
Assert(List<int> == typeof(List).MakeGenericType(int))
We need a syntactic way of referring to generic definition types as opposed to simple types.
Avishay Lavie - 16/Sep/06 03:20 PM I think the first assertion is problematic. In C#, one would write:
Assert(List<int> == typeof(List<>).MakeGenericType(int))
and not:
Assert(List<int> == typeof(List).MakeGenericType(int))
We need a syntactic way of referring to generic definition types as opposed to simple types.
Assert(List<int> == typeof(List<>).MakeGenericType(int))
and not:
Assert(List<int> == typeof(List).MakeGenericType(int))
We need a syntactic way of referring to generic definition types as opposed to simple types.