[IronPython] constructor inheritance not working

Niel Bornstein nbornstein at gmail.com
Wed Aug 25 13:50:49 CEST 2004


On Wed, 25 Aug 2004 12:55:47 +0200, Paolo Molaro <lupus at ximian.com> wrote:
> If you invert the two TestCtor constructors in the source and recompile,
> the test runs fine in mono (would be interesting to know if it will work
> on the MS runtime, for some reason it hangs for me when running this
> sample, so I can't test it myself). There is still a minute chance this
> is due to some different behaviour in reflection between mono and MS,
> haven't investigated further.

After switching the order of constructors in testctor.cs:

C:\development\IronPython-0.6>csc testctor.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

C:\development\IronPython-0.6>csc /target:library testctor.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

C:\development\IronPython-0.6>testctor.exe
a is 5, b is 3

C:\development\IronPython-0.6>bin\IronPythonConsole.exe testctor.py
a is 5  b is 3

So it works fine in MS .NET 1.1.

Niel



More information about the Ironpython-users mailing list