[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: f-spot is orphaned: in danger of being removed from Fedora

2008/7/6 Kevin Kofler <kevin kofler chello at>:
Alex Lancaster <alexl <at> users.sourceforge.net> writes:
> error CS0136: A local variable named `result' cannot be declared in this
> scope because it would give a different meaning to `result', which is already
> used in a `method argument' scope to denote something else
> generated/VolumeAdapter.cs(152,72): (Location of the symbol related to
> previous error)

This error message says you have a variable in an inner scope shadowing a
variable in an outer scope. This is allowed in "the programmer is always right"
type languages like C or C++, but not in "let's try to prevent common mistakes
by banning the constructs which cause them" type languages like Java or C#.
(The potential mistake in this case is of course confusing the variables with
the same name, i.e. trying to refer to the outer "result" variable and getting
the inner one instead.)

The obvious fix is of course to rename the local "result" variable to something
non-conflicting. Given that this code appears to be automatically generated,
the patch will probably have to be applied to the generator.

The more disturbing thing, if I read the output correctly is that it happens while compiling gio-sharp.dll which definitely shouldn't be in f-spot. I haven't had time to take a stab at the offending code but it feels like it is including gnome-desktop-sharp stuff. In that case the correct fix would be making it use the system libraries.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]