[nem-bug] [Nemerle 0000782]: Internal Compiler error (assertion
failed in Typer4.n)
feedback at nemerle.org
feedback at nemerle.org
Wed Nov 8 22:51:27 CET 2006
The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=782>
======================================================================
Reported By: akhropov
Assigned To: malekith
======================================================================
Project: Nemerle
Issue ID: 782
Category: Compiler (type engine)
Reproducibility: always
Severity: crash
Priority: normal
Status: resolved
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 11-06-2006 23:25 CET
Last Modified: 11-08-2006 22:51 CET
======================================================================
Summary: Internal Compiler error (assertion failed in
Typer4.n)
Description:
Encountered ICE while toying with pure functional programming:
--------------------------------------------------------------
[Record]
class Results{ public y : int }
[Record]
class Input{ public x : int }
def AskUser( y : Results ) : Input
{
if(y == null) Input(5) else null
}
def DoMath( x : Input ) : Results
{
Results(x.x*x.x)
}
def Calculator() : Results
{
def AskFunc(results)
{
( AskUser( results ), results )
}
def Calc(input,results)
{
| (null,_) => results
| _ => Calc( AskFunc( DoMath( input ) ) )
}
Calc( AskFunc(null) )
}
System.Console.WriteLine(Calculator());
--------------------------------------------------------------
D:\MyProjects\Nemerle>ncc Calc1.n
Calc1.n:27:23:27:38: debug: Internal compiler error, please report a bug
to bugs
.nemerle.org. You can try modifying program near this location.
&http://nemerle.org/bugs/view.php?id=8592;[01;31merror&http://nemerle.org/bugs/view.php?id=8592;[0m:
internal compiler error: assertion failed
in file ncc\generat
ion\Typer4.n, line 599:
invalid thing called AskFunc
at Nemerle.Compiler.Typer4.DoWalk(TExpr expr) in
D:\Nemerle\trunk\ncc\generat
ion\Typer4.n:line 599
...<long stack trace follows>
======================================================================
----------------------------------------------------------------------
malekith - 11-08-06 22:30
----------------------------------------------------------------------
It seems a problem in T3, where the call to local function is not expanded.
----------------------------------------------------------------------
malekith - 11-08-06 22:51
----------------------------------------------------------------------
Fixed in r6855.
Issue History
Date Modified Username Field Change
======================================================================
11-06-06 23:25 akhropov New Issue
11-08-06 22:30 malekith Note Added: 0001496
11-08-06 22:30 malekith Status new => confirmed
11-08-06 22:30 malekith Description Updated
11-08-06 22:51 malekith Status confirmed => resolved
11-08-06 22:51 malekith Resolution open => fixed
11-08-06 22:51 malekith Assigned To => malekith
11-08-06 22:51 malekith Note Added: 0001497
======================================================================
More information about the bugs
mailing list