[Mono-list] [PATCH] BitVector32

Andrew Birkett adb@tardis.ed.ac.uk
Sat, 22 Jun 2002 00:14:44 +0100 (BST)


On 21 Jun 2002, Miguel de Icaza wrote:

> > Implemented the 'set' part of the BitVector32.Section indexer.
>
>    Is there any chance you could also cook up a set of nice regression
> tests for the class libraries?

No problem, I'll get that done in the next few days.  I'm mostly
interested in the compiler, but I plan on doing some more class library
stuff to get going.  I'll also send a seperate patch which will stop the
compiler from aborting when it encounters overly large integer literals
too.

I noticed that the "make sure each case in a switch() ends in break" and
the "make sure all control paths return an appropriately typed value"
features both need the same control-flow analysis.  I intend to look at
that too, but more for my own education rather than having any high
probability of coding the whole thing.

I have a few general questions too, which it'd be cool if you can answer:

Firstly, what's the policy on the text in exceptions?  Should they match
the M$ implementation?  I only ask this because while I was learning C# I
misunderstood format specifiers but only got an unhelpfully generic "Bad
format string" exception rather than, for example, "Bad width specifier in
format string".  In general, should people be submitting patches to
improve things like this or is there some Deeper Reason behind the choice
of error messages.

Secondly, how do you choose the compiler error number which gets passed to
Report.Error()?  Again, I suspect you might be matching the M$ behaviour
but I only have a linux box here so I can't check.

Ta,
Andrew

- www.tardis.ed.ac.uk/~adb -