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   Resolved: 07/Apr/07 07:41 AM
Return to search
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.



Avishay Lavie added a comment - 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 added a comment - 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 added a comment - 06/Apr/07 09:22 AM

Thanks Avish.


Avishay Lavie added a comment - 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.