[ nice-Bugs-1513507 ] Compiler crash with custom forIterator

"SourceForge.net" <[email protected]> Tue, 27 Jun 2006 11:11:26 -0700
Newsgroups gmane.comp.lang.nice.devel
Message-ID <[email protected]>
Bugs item #1513507, was opened at 2006-06-27 18:11
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1513507&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
Submitted By: B S (ben77)
Assigned to: Nobody/Anonymous (nobody)
Summary: Compiler crash with custom forIterator

Initial Comment:
Using this test, nicec crashes.
file:
<T> Iterator<!T> forIterator(void->?T gen){
  return [].iterator();
}

void->?String lines(){
  return ()=> "";
}

void main(String[] args){
  for(line:lines()){}
}

Output:
nice.lang: parsing
bug: parsing
bug: typechecking

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" bossa.util.InternalError:
panic: assertion failed:
        at bossa.util.Internal.error(Internal.java:86)
        at mlsub.typing.lowlevel.S.panic(S.java:79)
        at mlsub.typing.lowlevel.S.assume(S.java:101)
        at mlsub.typing.lowlevel.S.assume(S.java:97)
        at
mlsub.typing.lowlevel.DomainVector.reduce(DomainVector.java:65)
        at
mlsub.typing.lowlevel.K0.reduceDomain(K0.java:846)
        at mlsub.typing.lowlevel.K0.leq0(K0.java:695)
        at mlsub.typing.lowlevel.K0.leq(K0.java:653)
        at
mlsub.typing.lowlevel.Engine$Constraint.leq(Engine.java:983)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:265)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:232)
        at mlsub.typing.Variance.leq(Variance.java:198)
        at mlsub.typing.Variance.leq(Variance.java:190)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:265)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:232)
        at
mlsub.typing.NullnessKind.leq(NullnessKind.java:113)
        at
mlsub.typing.NullnessKind.leq(NullnessKind.java:89)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:265)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:232)
        at
mlsub.typing.FunTypeKind.leq(FunTypeKind.java:76)
        at
mlsub.typing.FunTypeKind.leq(FunTypeKind.java:67)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:265)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:232)
        at
mlsub.typing.NullnessKind.leq(NullnessKind.java:113)
        at
mlsub.typing.NullnessKind.leq(NullnessKind.java:89)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:265)
        at
mlsub.typing.lowlevel.Engine.leq(Engine.java:232)
        at mlsub.typing.Typing.leq(Typing.java:355)
        at
mlsub.typing.MonotypeLeqCst.enter(MonotypeLeqCst.java:58)
        at
mlsub.typing.Constraint.enter(Constraint.java:297)
        at
mlsub.typing.Constraint.enter(Constraint.java:308)
        at
bossa.syntax.fun.ensureMonomorphic(tools.nice:78)
        at
bossa.syntax.dispatch.ensureMonomorphic(Unknown Source)
        at bossa.syntax.fun.typecheck(typecheck.nice:831)
        at bossa.syntax.dispatch.typecheck(Unknown Source)
        at bossa.syntax.fun.lambda28(Unknown Source)
        at bossa.syntax.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 bossa.syntax.fun.typecheck(typecheck.nice:802)
        at bossa.syntax.dispatch.typecheck(Unknown Source)
        at
bossa.syntax.fun.innerTypecheck(defaultMethod.nice:100)
        at
bossa.syntax.DefaultMethodImplementation.innerTypecheck(defaultMethod.nice)
        at
bossa.syntax.fun.innerTypecheck(defaultMethod.nice:28)
        at
bossa.syntax.MethodDeclaration.innerTypecheck(methodDeclaration.nice)
        at
bossa.syntax.fun.typecheck(methodDeclaration.nice:161)
        at
bossa.syntax.MethodDeclaration.typecheck(methodDeclaration.nice)
        at bossa.syntax.Node.doTypecheck(Node.java:299)
        at bossa.syntax.Node.doTypecheck(Node.java:304)
        at bossa.syntax.Node.doTypecheck(Node.java:304)
        at bossa.syntax.fun.typechecking(ast.nice:146)
        at bossa.syntax.CAST.typechecking(ast.nice)
        at
bossa.modules.Package.typecheck(Package.java:369)
        at mlsub.compilation.fun.lambda25(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:29)
        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=1513507&group_id=12788

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642