[ nice-Bugs-1514687 ] ":" constraint in type variables gives badly worded errors
"SourceForge.net" <[email protected]> Thu, 29 Jun 2006 14:30:50 -0700
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1514687, was opened at 2006-06-29 21:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1514687&group_id=12788
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: B S (ben77)
Assigned to: Nobody/Anonymous (nobody)
Summary: ":" constraint in type variables gives badly worded errors
Initial Comment:
All nice-0.9.12.
The code:
interface A{}
<T | T : A> T f(T a);
gives the error message:
T is not a class
Which doesn't make much sense. The same error occurs if
A is an abstract interface. Worse yet, if you declare f
like using this constraint <Object T | T: A> (which
seems unlikely), you get "Object is not a class".
If you add a different class to the constraint like this:
interface A{}
<Integer T | T : A> T f(T a);
you get:
A should be an interface
Which also makes no sense. If instead A is an abstract
interface you get this message, which makes some more
sense:
The type of method f is not well formed: <T | T <
java.lang.Integer, T:test.A> (T)->T
mlsub.typing.TypingEx: Unsatisfiable 1:[NO MESSAGE]
The ":" or "implements" only works if you have
something like this:
abstract interface A{}
abstract interface B {}
<B T | T : A> T f(T a);
I assume this is how it is supposed to work, since
using <B T |T <: A> gives an error message. The only
problem is that the error messages could use some work.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1514687&group_id=12788
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642