[ nice-Bugs-2860266 ] Error compiler - DbC with Return of function null
"SourceForge.net" <[email protected]> Wed, 16 Sep 2009 20:31:42 +0000
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #2860266, was opened at 2009-09-16 16:31
Message generated for change (Tracker Item Submitted) made by ronneesley
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=2860266&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
Private: No
Submitted By: Ronneesley Moura Teles (ronneesley)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error compiler - DbC with Return of function null
Initial Comment:
Version of compiler
==================================================
nicec --version
Nice compiler version 0.9.13 (build 2008.05.06, 11:44:43 UTC)
Compiled using JDK 1.4.2
Copyright (C) 2003 Daniel Bonniot
Visit the Nice homepage: http://nice.sourceforge.net
==================================================
The CODE
==================================================
class Calculadora {
?int somar(int numero)
ensures result != null && result > 0 : "O retorno deve ser positivo"
{
return numero + 1;
}
}
void main(String[] args) {
var calculadora = new Calculadora();
println(calculadora.somar(10));
println(calculadora.somar(-5));
}
===========================================
The error message
===========================================
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" java.lang.Error: non-matching types to emitGotoIfCompare2
at gnu.bytecode.CodeAttr.emitGotoIfCompare2(CodeAttr.java:1304)
at gnu.bytecode.CodeAttr.emitGotoIfGt(CodeAttr.java:1315)
at nice.lang.inline.CompOp.compileJump(CompOp.java:106)
at nice.lang.inline.ShortCircuitOp.compileJump(ShortCircuitOp.java:145)
at nice.lang.inline.Assert.compile(Assert.java:61)
at gnu.expr.ApplyExp.compile(ApplyExp.java:192)
at gnu.expr.ApplyExp.compile(ApplyExp.java:111)
at gnu.expr.Expression.compileNotePosition(Expression.java:82)
at gnu.expr.Expression.compileWithPosition(Expression.java:69)
at gnu.expr.CheckContract.compile(CheckContract.java:59)
at gnu.expr.Expression.compileWithPosition(Expression.java:72)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1565)
at gnu.expr.LambdaExp.compileAsMethod(LambdaExp.java:1536)
at gnu.expr.LambdaExp.compileChildMethods(LambdaExp.java:1422)
at gnu.expr.ClassExp.compileChildMethods(ClassExp.java:573)
at gnu.expr.Compilation.compileAll(Compilation.java:1614)
at gnu.expr.Compilation.generate(Compilation.java:1588)
at gnu.expr.Compilation.compile(Compilation.java:1556)
at gnu.expr.Package.compileToFiles(Package.java:100)
at bossa.modules.Package.finishCompilation(Package.java:411)
at bossa.modules.Package.link(Package.java:388)
at mlsub.compilation.fun.lambda27(Unknown Source)
at mlsub.compilation.fun.apply1(Unknown Source)
at gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at nice.lang.fun.foreach(collections.nice:141)
at nice.lang.dispatch.foreach(Unknown Source)
at mlsub.compilation.fun.compileComponent(make.nice:33)
at mlsub.compilation.dispatch.compileComponent(Unknown Source)
at mlsub.compilation.fun$make.lambda24(Unknown Source)
at mlsub.compilation.fun$make.apply1(Unknown Source)
at gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at nice.lang.fun.foreach(collections.nice:141)
at nice.lang.dispatch.foreach(Unknown Source)
at mlsub.compilation.fun.make(make.nice:44)
at mlsub.compilation.dispatch.make(Unknown Source)
at nice.tools.compiler.fun.compile(interface.nice:40)
at nice.tools.compiler.dispatch.compile(Unknown Source)
at nice.tools.compiler.console.fun.compile(main.nice:170)
at nice.tools.compiler.console.dispatch.compile(Unknown Source)
at nice.tools.compiler.console.fun.main(main.nice:204)
at nice.tools.compiler.console.dispatch.main(Unknown Source)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=2860266&group_id=12788
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf