[ nice-Bugs-1070443 ] InternalError in OverloadedSymbolExp
"SourceForge.net" <[email protected]> Sun, 21 Nov 2004 05:41:15 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1070443, was opened at 2004-11-21 16:35
Message generated for change (Comment added) made by artemgr
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1070443&group_id=12788
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Artem Gr Kozarezov (artemgr)
Assigned to: Nobody/Anonymous (nobody)
Summary: InternalError in OverloadedSymbolExp
Initial Comment:
Following code produces a compiler exception:
8<------------------------------------------>8
/// PASS
StringBuffer joinLn( String[] list, StringBuffer buf =
new StringBuffer(), int from = 0 )
= joinLn( list, buf.append( list[ from ] ).append( '\n' ),
from + 1 );
8<------------------------------------------>8
Compiler version is:
Nice compiler version 0.9.9 (build 2004.09.22, 00:40:25
UTC)
Compiled using JDK 1.4.2_04
Produced exception is:
[nicec] An exception has occured in the compiler
[nicec] Please fill-in a bug report at the following
webpage:
[nicec] http://sourceforge.net/tracker/?
func=add&group_id=12788&atid=112788
[nicec]
[nicec] Stack trace:
[nicec] Exception in thread "main" bossa.util.
InternalError: compile in class bossa.syntax.
OverloadedSymbolExp
[nicec] [java.lang.StringBuffer new java.lang.
StringBuffer(?java.lang.String)
[nicec] |java.lang.StringBuffer new java.lang.
StringBuffer(nice.lang.int)
[nicec] |java.lang.StringBuffer new java.lang.
StringBuffer()]
[nicec] at bossa.util.Internal.error(Internal.java:
86)
[nicec] at bossa.syntax.fun.
compile(overloadedsymbol.nice:363)
[nicec] at bossa.syntax.OverloadedSymbolExp.
compile(overloadedsymbol.nice)
[nicec] at bossa.syntax.Expression.
generateCode(Expression.java:212)
[nicec] at bossa.syntax.Expression.
generateCodeInCallPosition(Expression.java:225)
[nicec] at bossa.syntax.fun.compile(call.nice:
160)
[nicec] at bossa.syntax.CallExp.compile(call.nice)
[nicec] at bossa.syntax.Expression.
generateCode(Expression.java:212)
[nicec] at bossa.syntax.Expression.
compile(Expression.java:235)
[nicec] at bossa.syntax.fun.compileParams(call.
nice:176)
[nicec] at bossa.syntax.CallExp.
compileParams(call.nice)
[nicec] at bossa.syntax.fun.compile(call.nice:
160)
[nicec] at bossa.syntax.CallExp.compile(call.nice)
[nicec] at bossa.syntax.Expression.
generateCode(Expression.java:212)
[nicec] at bossa.syntax.Expression.
compile(Expression.java:235)
[nicec] at bossa.syntax.fun.compileParams(call.
nice:176)
[nicec] at bossa.syntax.CallExp.
compileParams(call.nice)
[nicec] at bossa.syntax.fun.compile(call.nice:
160)
[nicec] at bossa.syntax.CallExp.compile(call.nice)
[nicec] at bossa.syntax.Expression.
generateCode(Expression.java:212)
[nicec] at bossa.syntax.fun.generateCode(fun.
nice)
[nicec] at bossa.syntax.ExpressionStmt.
generateCode(statementexp.nice)
[nicec] at bossa.syntax.Statement.
compile(Statement.java:57)
[nicec] at bossa.syntax.fun.generateCode(block.
nice:106)
[nicec] at bossa.syntax.Block.
generateCode(block.nice)
[nicec] at bossa.syntax.Statement.
compile(Statement.java:57)
[nicec] at bossa.syntax.fun.generateCode(block.
nice:106)
[nicec] at bossa.syntax.Block.
generateCode(block.nice)
[nicec] at bossa.syntax.Statement.
compile(Statement.java:57)
[nicec] at bossa.syntax.fun.generateCode(block.
nice:106)
[nicec] at bossa.syntax.Block.
generateCode(block.nice)
[nicec] at bossa.syntax.MethodImplementation.
getRefExp(MethodImplementation.java:167)
[nicec] at bossa.syntax.MethodImplementation.
compile(MethodImplementation.java:178)
[nicec] at bossa.syntax.AST.compile(AST.java:
218)
[nicec] at bossa.modules.Package.
generateCode(Package.java:724)
[nicec] at bossa.modules.Package.
compile(Package.java:271)
[nicec] at mlsub.compilation.fun.lambda25(make.
nice:30)
[nicec] at mlsub.compilation.fun.apply1(fun.nice)
[nicec] at gnu.expr.ModuleMethod.
apply1(ModuleMethod.java:89)
[nicec] at nice.lang.fun.foreach(collections.nice:
141)
[nicec] at nice.lang.dispatch.foreach(dispatch.
nice)
[nicec] at mlsub.compilation.fun.
compileComponent(make.nice:30)
[nicec] at mlsub.compilation.dispatch.
compileComponent(dispatch.nice)
[nicec] at mlsub.compilation.fun$make.
lambda23(make.nice:45)
[nicec] at mlsub.compilation.fun$make.
apply1(fun.nice)
[nicec] at gnu.expr.ModuleMethod.
apply1(ModuleMethod.java:89)
[nicec] at nice.lang.fun.foreach(collections.nice:
141)
[nicec] at nice.lang.dispatch.foreach(dispatch.
nice)
[nicec] at mlsub.compilation.fun.make(make.nice:
44)
[nicec] at mlsub.compilation.dispatch.
make(dispatch.nice)
[nicec] at nice.tools.compiler.fun.
compile(interface.nice:40)
[nicec] at nice.tools.ant.Nicec.execute(Nicec.
java:305)
[nicec] at org.apache.tools.ant.UnknownElement.
execute(UnknownElement.java:275)
[nicec] at org.apache.tools.ant.Task.
perform(Task.java:364)
[nicec] at org.apache.tools.ant.Target.
execute(Target.java:341)
[nicec] at org.apache.tools.ant.Target.
performTasks(Target.java:369)
[nicec] at org.apache.tools.ant.Project.
executeTarget(Project.java:1214)
[nicec] at org.eclipse.ant.internal.ui.antsupport.
InternalAntRunner.run(InternalAntRunner.java:379)
[nicec] at org.eclipse.ant.internal.ui.antsupport.
InternalAntRunner.main(InternalAntRunner.java:135)
----------------------------------------------------------------------
>Comment By: Artem Gr Kozarezov (artemgr)
Date: 2004-11-21 16:41
Message:
Logged In: YES
user_id=289741
The code previously submitted was invalid.
Should be:
/// PASS
StringBuffer joinLn( String[] list, StringBuffer buf = new
StringBuffer(), int from = 0 )
= from < list.length ? joinLn( list, buf.append( list[ from ] ).
append( '\n' ), from + 1 ) : buf;
But this correct code produces the same compiler exception.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1070443&group_id=12788
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8