Wrong comment/diagnostic in parse.y

Ranjit Mathew rmathew@gmail.com
Tue Jun 15 08:03:00 GMT 2004


Hi,
 This should qualify as "obvious", but I just needed
to confirm and get an explicit approval - the comment
in line 4010 and the diagnostic in line 4013 in parse.y
(method create_class()) is wrong - the actual error is
that the user is trying to make java.lang.Object extend
something else:
----------------------------- 8< -----------------------------
 4007 /* If SUPER exists, use it, otherwise use Object */
 4008 if (super)
 4009 {
 4010 /* Can't extend java.lang.Object */
 4011 if (TREE_TYPE (IDENTIFIER_CLASS_VALUE (class_id)) == object_type_n
 ode)
 4012 {
 4013 parse_error_context (id, "Can't extend `java.lang.Object'");
 4014 return NULL_TREE;
 4015 }
 4016
 4017 super_decl_type =
 4018 register_incomplete_type (JDEP_SUPER, super, decl, NULL_TREE);
 4019 }
----------------------------- 8< -----------------------------
Shall I change it to "`java.lang.Object' can't extend anything"?
(ISTR that we decided to not use "inverted single quotes" for
such messages...or did we?)
Thanks,
Ranjit.
-- 
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /