[Issue 4145] cross alias namespace can't be resolve

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4145

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|unspecified |D2

--


[Issue 4145] cross alias namespace can't be resolve

2014-01-15 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4145


galaxylang galaxyl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4145] cross alias namespace can't be resolve

2010-05-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4145


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #1 from bearophile_h...@eml.cc 2010-05-02 03:27:23 PDT ---
This code can contain more than one problem. This is a reduced test case that
shows one of the problems:


class A(T) {}
class B(T) {}
alias B!Foo Bar;
alias A!(int) Foo;
void main() {}


dmd 2.043 shows:
test.d(3): Error: forward reference to 'A!(int)'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4145] cross alias namespace can't be resolve

2010-05-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4145



--- Comment #2 from galaxylang galaxyl...@gmail.com 2010-05-02 04:57:02 PDT 
---
So a alternative way to solve this problem is re-typedef the it


class A(T) {}
class B(T) {}
alias B!Foo Bar;
typedef A!(int) Foo;
void main() {}

but this will cause a new problem,see below

class A
{
  static A create();
}
typedef A B;
unittest
{
   B b=B.create();//error: A can't convert to B
}

should A create() change to B create when typedef used?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---