[IronPython] Compilation error

Dino Viehland dinov at exchange.microsoft.com
Fri Oct 5 02:55:00 CEST 2007

It looks like csc doesn't require out params to be assigned if they're value types:

class foo {
    public struct baz {
    public object []bar(object[]args, out baz x) {
         return args;

But it properly enforces it if it's an int, a DateTime, or a decimal.  I'll let them know.

From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo [sanxiyn at gmail.com]
Sent: Thursday, October 04, 2007 5:42 PM
To: Discussion of IronPython
Subject: [IronPython] Compilation error

With latest Mono with some local changes (sorry that means you won't
be able to reproduce this) I get compilation error with latest
IronPython from CodePlex.

IronPython/Runtime/Types/ComDispatch/DispCallable.cs(42,21): error
CS0177: The out parameter `parameterModifiers' must be assigned to
before control leaves the current method

Indeed, in IronPython.Runtime.Types.ComDispatch.GetArgsForCall, the
out parameter is never assigned if it returns early because
countOfArgs is zero.

Doesn't csc catch this? If so that would be a csc bug I think.

A trivial fix is available from FePy SVN has patch-cs0177.

Seo Sanghyeon
Users mailing list
Users at lists.ironpython.com

More information about the Ironpython-users mailing list