History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-742
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Avishay Lavie
Reporter: Snaury
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

Current Generic support breaks name resolution

Created: 26/Jun/06 05:08 AM   Updated: 07/Apr/07 07:41 AM
Component/s: Compiler
Affects Version/s: 0.7.6
Fix Version/s: 0.7.7

Time Tracking:
Not Specified

Environment: boo-0.7.6.2299, .net 2.0


 Description  « Hide
The following code:
foo.boo
import System.Collections
import System.Collections.Generic

def foo() as IEnumerable:
  yield 1
  yield 2
  yield 3

Reports BCE0004: Ambiguous reference 'IEnumerable': System.Collections.IEnumerable, System.Collections.Generic.IEnumerable.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Avishay Lavie - 08/Feb/07 05:11 PM
We need some different syntax to reference generic type definitions. C# has IEnumerable<> and IDictionary<,>, which is kinda ugly but distinguishes them from the non-generic IEnumerable and IDictionary. We need something similar so that a name without generic arguments will never be interpreted as a generic definition.

Avishay Lavie - 06/Apr/07 08:42 AM
This is becoming more and more bug-prone. I'd like to take over this issue. Is it OK with you, bamboo?

Rodrigo B. de Oliveira - 06/Apr/07 09:22 AM
Thanks Avish.

Avishay Lavie - 07/Apr/07 07:41 AM
Resolved in 2447.
References containing generic parameters only match generic types, and references that don't only match non-generic types. To reference a generic type definition, the "Type of *" or "Type[of *, *]" syntax can be used.