Infinite loop in compiler with forward reference

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Aug 13 16:53:45 PDT 2010


Yup, infinite loop.

On Sat, Aug 14, 2010 at 1:39 AM, Justin Johansson <no at spam.com> wrote:

> Compiling the following with latest DMD D2 sends the compiler into an
> infinite loop.  The culprit line seems to be the alias definition.
> Can someone else please confirm.
> Thanks Justin
>
>
>
>
> module test;
>
>
> class Base
> {
>   Base foo();
> }
>
> class Foo: Base
> {
>   static class Bar: Foo
>   {
>      Bar foo() {
>         return this;
>      }
>   }
>
>   Bar foo();
> }
>
> alias Foo.Bar FooBar;
>
>
> void main()
> {
> }
>
>
>
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'eVr'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'eWr'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'eXr'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'eYr'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'eZr'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e0r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e1r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e2r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e3r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e4r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e5r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e6r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e7r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e8r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e9r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'e_r'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'eaar'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'ebar'
> test.d(10): Error: class test.Foo is forward referenced when looking for
> 'ecar'
> ....
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100814/1fe2f284/attachment-0001.html>


More information about the Digitalmars-d mailing list