G'day

I was wondering whether the following is a bug in dmd or a feature in D:

module a:

class TClass ( T )
{
}

class Foo
{
        private struct Test
        {               
        }
}


module b:

import a;

class Bar : TClass!(Foo.Test)
{
}


void main()
{
        auto var = new Bar;
}


dmd a.d b.d


This works for me, no compilation errors. Why can module b access Foo.Test for the template parameter?



--
Mathias Baumann
Research and Development

sociomantic labs GmbH
Münzstraße 19
10178 BERLIN
DEUTSCHLAND

http://www.sociomantic.com

Fon:           +49 (0)30 5015 4701
Fax:           +49 (0)30 2403 6715
Skype:         Mathias Baumann (m4renz)
-----------------------------------------------------------

sociomantic labs GmbH, Location: Berlin
Commercial Register - AG Charlottenburg: HRB 121302 B
VAT No. - USt-ID: DE 266262100
Managing Directors: Thomas Nicolai, Thomas Brandhoff

Reply via email to