🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8623

RTTI at method call time

#8623
From: Calvin R. Smith
Date: Mon, 12 Mar 2001 16:08
22 lines
1291 bytes
I've noticed that in java RTTI is not used when calling a function.  For
example consider this example:

public void a()
{
  MyClass mc = new MyClass();
  b(mc);  // should call b but c is called instead
}

public void b(MyClass mc)
{
}

public void c(Object o)
{
}

In this example c is always called even if the real class is declared as a
type.

Is this known to be fixed someday?  I've tested this with jdk1.3 with
jbuilder 4
Technical Details
Message-ID: <3aacf50e_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!dnews!168.191.234.208

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,236a87dd0ff35d6d,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-12 08:16:06 PST
From: "Calvin R. Smith" <calvinrsmith@hotmail.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: RTTI at method call time
Date: Mon, 12 Mar 2001 09:08:54 -0700
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 168.191.234.208
Message-ID: <3aacf50e_2@dnews>
X-Trace: 12 Mar 2001 08:10:54 -0800, 168.191.234.208
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!dnews!168.191.234.208