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
==================================================
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));
}
===========================================
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)
The code