[nem-bug] [Nemerle 0001029]: using generic type alias: wrong member lookup

feedback at nemerle.org feedback at nemerle.org
Wed Sep 5 20:29:07 CEST 2007


A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=1029> 
======================================================================
Reported By:                divan
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   1029
Category:                   Compiler (type engine)
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             06-21-2007 10:00 CEST
Last Modified:              09-05-2007 20:29 CEST
======================================================================
Summary:                    using generic type alias: wrong member lookup
Description: 
Following doesn't work:

type A = B[C];
using A;
_ = static_member_of_B ();

It doesn't apply generic parameters to member, so they are inferred, not
always correctly.

Don't know what exactly goes wrong, some possibilities:
1) Bar TypeBuilder claims that LookupMemberAvailable, but it doesn't find
foo.
I don't see where TypeBuilder stores aliased type to fix it.
2) Somehow Foo members are lookuped too, maybe just generic parameters
need to be applied after lookup. 
3) When lookup happens Bar TypeBuilder tydecl is still Class, not alias,
so it possibly breaks things in GlobalEnv.LookupSymbol.add_members_from.
======================================================================

----------------------------------------------------------------------
 divan - 06-21-07 10:01 
----------------------------------------------------------------------
Maybe related to 676.

----------------------------------------------------------------------
 BOleg - 09-05-07 20:29 
----------------------------------------------------------------------
Check, please, patch (test suite included).

Issue History
Date Modified  Username       Field                    Change              
======================================================================
06-21-07 10:00 divan          New Issue                                    
06-21-07 10:01 divan          Note Added: 0001921                          
06-25-07 14:48 Klapaucius     Issue Monitored: Klapaucius                    
09-05-07 20:27 BOleg          File Added: type-alias.patch                    
09-05-07 20:29 BOleg          Note Added: 0001952                          
======================================================================




More information about the bugs mailing list