[ nice-Bugs-1090870 ] Method inside class with less type parameters than in parent

"SourceForge.net" <[email protected]> Sat, 25 Dec 2004 06:10:37 -0800
Newsgroups gmane.comp.lang.nice.devel
Message-ID <[email protected]>
Bugs item #1090870, was opened at 2004-12-24 16:48
Message generated for change (Comment added) made by bonniot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1090870&group_id=12788

Category: None
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: mike.beckerle (mbeckerle)
Assigned to: Daniel Bonniot (bonniot)
>Summary: Method inside class with less type parameters than in parent

Initial Comment:
It said to report this bug, so here it is. Also in attached 
zip along with the code and makefile. 

cd c:/Documents and Settings/beckerle.ASCENTIAL/My 
Documents/flash/nicetest/bug2/
make -k test
nicec.bat --version
Nice compiler version 0.9.9 (build 2004.09.22, 00:40:25 
UTC)
Compiled using JDK 1.4.2_04
Copyright (C) 2003 Daniel Bonniot
Visit the Nice homepage: http://nice.sourceforge.net
nicec.bat  --sourcepath=.. -a bug2.jar bug2
nice.lang: parsing
bug2: parsing

An exception has occured in the compiler
Please fill-in a bug report at the following webpage:
http://sourceforge.net/tracker/?
func=add&group_id=12788&atid=112788

Stack trace:
Exception in thread "main" mlsub.typing.BadSizeEx: 2 
expected, 0 given
	at mlsub.typing.MonotypeConstructor.<init>
(MonotypeConstructor.java:50)
	at bossa.syntax.NiceMethod.create
(NiceMethod.java:123)
	at 
bossa.parser.Parser.internalMethodOrFunction
(Parser.java:900)
	at bossa.parser.Parser.classDefinition
(Parser.java:1304)
	at bossa.parser.Parser.definition
(Parser.java:2409)
	at bossa.parser.Parser.readDefinitions
(Parser.java:2446)
	at bossa.parser.Parser.module
(Parser.java:3019)
	at bossa.parser.JavaccParser.read
(JavaccParser.java:70)
	at bossa.modules.Content.read
(Content.java:111)
	at bossa.modules.Content.getDefinitions
(Content.java:86)
	at bossa.modules.Package.read
(Package.java:121)
	at bossa.modules.Package.<init>
(Package.java:87)
	at bossa.modules.Package.make
(Package.java:58)
	at bossa.modules.fun.setMainPackage
(Compilation.nice:89)
	at bossa.modules.Compilation.setMainPackage
(Compilation.nice)
	at nice.tools.compiler.fun.compile
(interface.nice:38)
	at bossa.modules.Compilation.compile
(Compilation.nice)
	at nice.tools.compiler.console.fun.compile
(main.nice:165)
	at nice.tools.compiler.console.dispatch.compile
(dispatch.nice)
	at nice.tools.compiler.console.fun.main
(main.nice:181)
	at nice.tools.compiler.console.dispatch.main
(dispatch.nice)

Compilation finished at Fri Dec 24 10:43:57


----------------------------------------------------------------------

Comment By: Daniel Bonniot (bonniot)
Date: 2004-12-25 15:10

Message:
Logged In: YES 
user_id=88952

This bug has been fixed. The next release of the compiler will
include this correction. In the mean time, I encourage you try
the development version. It contains a version of the compiler
that fixes the bug. Please try it and reopen the bug-report if
you find any problem with it.

To know how to get an install the development version of the
compiler that fixes this bug, please read
http://nice.sf.net/cgi-bin/twiki/view/Dev/DevelopmentVersion

Note that the bug has first been fixed in the CVS version, and it
might take one or two hours until the development version
includes the fix.

Thanks again for your help by submiting this bug report. 

Daniel Bonniot


----------------------------------------------------------------------

Comment By: Daniel Bonniot (bonniot)
Date: 2004-12-25 13:50

Message:
Logged In: YES 
user_id=88952

I think this bug is the same as #1084559. It is already
fixed in CVS. Normally the development version will be
updated in the next two hours. I will then close the bug,
together with instructions for how using that version.


----------------------------------------------------------------------

Comment By: mike.beckerle (mbeckerle)
Date: 2004-12-24 17:01

Message:
Logged In: YES 
user_id=1182016


More details. A much simpler example causes this crash. See 
attached.

package bug2;

class Env extends HashMap<String, String> {
//
// This is the problem. This toString method crashes the 
compiler.
// Moving it outside of the class as shown below fixes the 
crash.
//

  String toString() {
    return this.entrySet().toString();
  }

}
/*
String toString(Env e) {
  return e.entrySet().toString();
}
*/




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1090870&group_id=12788


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/