comp.lang.ada
 help / color / mirror / Atom feed
From: "John B. Matthews" <nospam@nospam.invalid>
Subject: Re: Ada/JVM: cannot import abstract subprogram
Date: Sat, 23 Mar 2013 10:53:07 -0400
Date: 2013-03-23T10:53:07-04:00	[thread overview]
Message-ID: <nospam-04B5D0.10530723032013@news.aioe.org> (raw)
In-Reply-To: f011046e-f3ba-4fc3-86b1-2aded0036fe7@googlegroups.com

In article <f011046e-f3ba-4fc3-86b1-2aded0036fe7@googlegroups.com>,
 Shark8 <onewingedshark@gmail.com> wrote:
[...]
> But there's a problem: in many of the files there are subprograms 
> marked abstract and then pragmas for importation yielding the error 
> of  "cannot import abstract subprogram" -- this leads me to believe 
> there is something wrong with the jvm2ada packaged w/ GNAT GPL 2012 
> {remember it didn't generate these errors a couple years ago}... is 
> anyone else having similar troubles? (I remember it being fairly easy 
> to get the JVM-GNAT to generate [and interface w/] class-files, the 
> rough spot being the Java-ideology of having all operations be on 
> references and the Ada-ideology of operating on the types 
> themselves.)

In Java, it's possible to instantiate an anonymous subclass of an 
abstract class [1], but it's a compile-time error to instantiate an 
abstract class directly [2].

Absent first-hand experience with jvm2ada, might this represent a way 
to enforce a similar compile-time restriction on an Ada client that 
tries to import an abstract parent, rather than a concrete subclass?

[...]

[1]: <http://stackoverflow.com/a/13671003/230513>
[2]: <http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.1.1.1>
-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>



  reply	other threads:[~2013-03-23 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 19:56 Ada/JVM: cannot import abstract subprogram Shark8
2013-03-23 14:53 ` John B. Matthews [this message]
2013-03-23 18:09   ` Shark8
2013-04-02 20:10     ` Blady
2013-04-03 12:05       ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox