|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (BOO-1071) List comprehension cannot be used inside array constructorList comprehension cannot be used inside array constructor
---------------------------------------------------------- Key: BOO-1071 URL: http://jira.codehaus.org/browse/BOO-1071 Project: Boo Issue Type: Bug Components: Compiler Affects Versions: 0.8.2 Reporter: Sami Kyöstilä Attachments: array-init.boo Using a list comprehension with an array initializer fails with a type error, e.g: a = array(short, [i ** 2 for i in range(10)]) ==> BCE0022: Cannot convert 'Array-initModule.Main$2' to 'short'. The following workaround does work, but it seems like the first form should work too: l = [i ** 2 for i in range(10)] a = array(short, l) Bonus wish: Allow for array comprehensions where the above would simply be (i ** 2 for i in range(10)). -- 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-1071) List comprehension cannot be used inside array constructor[ http://jira.codehaus.org/browse/BOO-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195398#action_195398 ] Rodrigo B. de Oliveira commented on BOO-1071: --------------------------------------------- Array comprehensions are written like this in boo: array(i ** 2 for i in range(10)) > List comprehension cannot be used inside array constructor > ---------------------------------------------------------- > > Key: BOO-1071 > URL: http://jira.codehaus.org/browse/BOO-1071 > Project: Boo > Issue Type: Bug > Components: Compiler > Affects Versions: 0.8.2 > Reporter: Sami Kyöstilä > Attachments: array-init.boo > > > Using a list comprehension with an array initializer fails with a type error, e.g: > a = array(short, [i ** 2 for i in range(10)]) > ==> BCE0022: Cannot convert 'Array-initModule.Main$2' to 'short'. > The following workaround does work, but it seems like the first form should work too: > l = [i ** 2 for i in range(10)] > a = array(short, l) > Bonus wish: Allow for array comprehensions where the above would simply be (i ** 2 for i in range(10)). -- 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] Closed: (BOO-1071) List comprehension cannot be used inside array constructor[ http://jira.codehaus.org/browse/BOO-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rodrigo B. de Oliveira closed BOO-1071. --------------------------------------- Resolution: Fixed Fix Version/s: 0.9.3 Assignee: Rodrigo B. de Oliveira Fixed in revision 3427. Thanks for the report! > List comprehension cannot be used inside array constructor > ---------------------------------------------------------- > > Key: BOO-1071 > URL: http://jira.codehaus.org/browse/BOO-1071 > Project: Boo > Issue Type: Bug > Components: Compiler > Affects Versions: 0.8.2 > Reporter: Sami Kyöstilä > Assignee: Rodrigo B. de Oliveira > Fix For: 0.9.3 > > Attachments: array-init.boo > > > Using a list comprehension with an array initializer fails with a type error, e.g: > a = array(short, [i ** 2 for i in range(10)]) > ==> BCE0022: Cannot convert 'Array-initModule.Main$2' to 'short'. > The following workaround does work, but it seems like the first form should work too: > l = [i ** 2 for i in range(10)] > a = array(short, l) > Bonus wish: Allow for array comprehensions where the above would simply be (i ** 2 for i in range(10)). -- 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 |