Details
Description
When the Boo compiler generates classes for anonymous callable types, it has to make them generic if the target is generic, and provide correct instantiation on usage. As long as this is not implemented, anonymous callables cannot be used in conjunction with generic types or methods.
Failing example:
public class GenericType of T: public Delegate as callable(T) // Need to create CompilerGenerated.callable__0[of T]
Issue Links
- depends upon
-
BOO-845
Cannot emit generator methods whose yield type is a generic parameter
-
- is duplicated by
-
BOO-1139
Cant invoke generic method with anonymous callable parameter type
-
- is related to
-
BOO-947
generic callable generates bad IL when generic parameter is itself a parameter.
-
- relates to
-
BOO-1026
Generic return type incompatibility
-
-
BOO-763
Defining new generic types
-
-
BOO-832
Defining new generic methods
-
Activity
| Summary | Compiler generated classes do not support generic types | Anonymous callable types don't signatures containing generic parameters |
| Description |
When the Boo compiler generates classes (for example, for generators or anonymous callable types), it has to make them generic if the target is generic, and provide correct instantiation. As long as this is not implemented, anonymous callables or generators cannot be used in conjunction with generic types or methods. Failing examples: Generator - {code} public class GenericType of T: def Method(items as (T)) as IEnumerator of T: for item in items: yield item // Need to create CompilerGenerated.generator__0[of T] {code} Anonymous callable type - {code} public class GenericType of T: public Delegate as callable(T) // Need to create CompilerGenerated.callable__0[of T] {code} |
When the Boo compiler generates classes for anonymous callable types, it has to make them generic if the target is generic, and provide correct instantiation on usage. As long as this is not implemented, anonymous callables cannot be used in conjunction with generic types or methods. Failing example: {code} public class GenericType of T: public Delegate as callable(T) // Need to create CompilerGenerated.callable__0[of T] {code} |
| Summary | Anonymous callable types don't signatures containing generic parameters | Anonymous callable types fail when signature contains generic parameters |
| Affects Version/s | 0.8.1 [ 13813 ] | |
| Fix Version/s | 0.9 [ 13816 ] |
| Fix Version/s | 0.9.1 [ 14922 ] | |
| Fix Version/s | 0.9 [ 13816 ] |
| Fix Version/s | 0.9.2 [ 15095 ] | |
| Fix Version/s | 0.9.1 [ 14922 ] |
| Fix Version/s | 0.9.2 [ 15095 ] | |
| Fix Version/s | 0.9.3 [ 15634 ] |
| Fix Version/s | 0.9.3 [ 15634 ] | |
| Fix Version/s | 0.9.4 [ 16080 ] |
| Fix Version/s | 0.9.5 [ 17086 ] | |
| Fix Version/s | 0.9.4 [ 16080 ] |
Changed title and description to refer to anonymous callable types only, since the generators issue is represented in
BOO-845.