This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: #!null in generic procedures


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);
>    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]