|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (BOO-1149) Problem with (nested?) generic classesProblem with (nested?) generic classes
-------------------------------------- Key: BOO-1149 URL: http://jira.codehaus.org/browse/BOO-1149 Project: Boo Issue Type: Bug Components: Compiler Affects Versions: 0.9 Reporter: Boris Bluntschli This C# code works: {code} public class Object<ObjectType> where ObjectType : Object<ObjectType> {} public class List<ObjectType> where ObjectType : Object<ObjectType> {} class Spam : Object<Spam> {} class Eggs : Object<Eggs> { List<Spam> list; } {/code} But written in Boo: {code} class Spam(Object[of Spam]): pass class Eggs(Object[of Eggs]): list as List[of Spam] {/code} Gives the compiler error {{The type 'Spam' must derive from 'Object[of ObjectType][List[of ObjectType].ObjectType]' in order to substitute the generic parameter 'ObjectType' in 'List[of ObjectType2]'. (BCE0149)}} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (BOO-1149) Problem with (nested?) generic classes[ http://jira.codehaus.org/browse/BOO-1149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163277#action_163277 ] Boris Bluntschli commented on BOO-1149: --------------------------------------- Damn, I put in {/code} instead of {code}, sorry about that :) > Problem with (nested?) generic classes > -------------------------------------- > > Key: BOO-1149 > URL: http://jira.codehaus.org/browse/BOO-1149 > Project: Boo > Issue Type: Bug > Components: Compiler > Affects Versions: 0.9 > Reporter: Boris Bluntschli > > This C# code works: > {code} > public class Object<ObjectType> > where ObjectType : Object<ObjectType> > {} > > public class List<ObjectType> > where ObjectType : Object<ObjectType> > {} > > class Spam : Object<Spam> {} > > class Eggs : Object<Eggs> > { > List<Spam> list; > } > {/code} > But written in Boo: > {code} > class Spam(Object[of Spam]): > pass > > class Eggs(Object[of Eggs]): > list as List[of Spam] > {/code} > Gives the compiler error {{The type 'Spam' must derive from 'Object[of ObjectType][List[of ObjectType].ObjectType]' in order to substitute the generic parameter 'ObjectType' in 'List[of ObjectType2]'. (BCE0149)}} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (BOO-1149) Problem with (nested?) generic classes[ http://jira.codehaus.org/browse/BOO-1149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rodrigo B. de Oliveira updated BOO-1149: ---------------------------------------- Description: This C# code works: {code} public class Object<ObjectType> where ObjectType : Object<ObjectType> {} public class List<ObjectType> where ObjectType : Object<ObjectType> {} class Spam : Object<Spam> {} class Eggs : Object<Eggs> { List<Spam> list; } {code} But written in Boo: {code} class Spam(Object[of Spam]): pass class Eggs(Object[of Eggs]): list as List[of Spam] {code} Gives the compiler error {{The type 'Spam' must derive from 'Object[of ObjectType][List[of ObjectType].ObjectType]' in order to substitute the generic parameter 'ObjectType' in 'List[of ObjectType2]'. (BCE0149)}} was: This C# code works: {code} public class Object<ObjectType> where ObjectType : Object<ObjectType> {} public class List<ObjectType> where ObjectType : Object<ObjectType> {} class Spam : Object<Spam> {} class Eggs : Object<Eggs> { List<Spam> list; } {/code} But written in Boo: {code} class Spam(Object[of Spam]): pass class Eggs(Object[of Eggs]): list as List[of Spam] {/code} Gives the compiler error {{The type 'Spam' must derive from 'Object[of ObjectType][List[of ObjectType].ObjectType]' in order to substitute the generic parameter 'ObjectType' in 'List[of ObjectType2]'. (BCE0149)}} > Problem with (nested?) generic classes > -------------------------------------- > > Key: BOO-1149 > URL: http://jira.codehaus.org/browse/BOO-1149 > Project: Boo > Issue Type: Bug > Components: Compiler > Affects Versions: 0.9 > Reporter: Boris Bluntschli > > This C# code works: > {code} > public class Object<ObjectType> > where ObjectType : Object<ObjectType> > {} > > public class List<ObjectType> > where ObjectType : Object<ObjectType> > {} > > class Spam : Object<Spam> {} > > class Eggs : Object<Eggs> > { > List<Spam> list; > } > {code} > But written in Boo: > {code} > class Spam(Object[of Spam]): > pass > > class Eggs(Object[of Eggs]): > list as List[of Spam] > {code} > Gives the compiler error {{The type 'Spam' must derive from 'Object[of ObjectType][List[of ObjectType].ObjectType]' in order to substitute the generic parameter 'ObjectType' in 'List[of ObjectType2]'. (BCE0149)}} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |