This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: #!null in generic procedures
- From: Chris Dean <Chris dot Dean at sokitomi dot com>
- To: Kawa List <kawa at sources dot redhat dot com>
- Date: Tue, 08 Apr 2003 09:57:39 -0700
- Subject: Re: #!null in generic procedures
- References: <31744.1049768008@mercedsystems.com>
The patch below has some unintended consequences, so I'll need to rework
it a later today. Specifically, (instance? #!null <number>) should
return #f, but now it returns #t.
Regards,
Chris Dean
Chris Dean <Chris dot Dean at sokitomi dot com> wrote:
> Index: gnu/bytecode/Type.java
> ===================================================================
> RCS file: /cvs/kawa/kawa/gnu/bytecode/Type.java,v
> retrieving revision 1.34
> diff -u -r1.34 Type.java
> --- gnu/bytecode/Type.java 18 Nov 2001 00:41:50 -0000 1.34
> +++ gnu/bytecode/Type.java 8 Apr 2003 01:45:43 -0000
> @@ -281,6 +281,8 @@
>
> public boolean isInstance (Object obj)
> {
> + if (obj == null)
> + return true;
> return getReflectClass().isInstance(obj);
> }