History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-684
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Rodrigo B. de Oliveira
Reporter: Daniel Grunwald
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

Compiler error with generator expression and test for null

Created: 04/Mar/06 04:46 PM   Updated: 19/Apr/06 10:25 PM
Component/s: Compiler
Affects Version/s: 0.7.6
Fix Version/s: 0.7.6

Time Tracking:
Not Specified

Environment: Boo 0.7.6.2136


 Description  « Hide
An internal compiler error occurs in the "while h != null:" line. Somehow everything works fine using "while h is not null".

import System

class Helper:
[getter(Stringlist)]
stringlist as (string)

h = Helper()
while h != null:
print text for text in h.Stringlist
//h = nextHelper()

[...]
Entering Boo.Lang.Compiler.Steps.EmitAssembly
ASSEMBLY LOADED: <dynamic>Program, Version=0.0.0.0
ASSEMBLY LOADED: c:\windows\assembly\gac\isymwrapper\1.0.5000.0__b03f5f7f11d50a3a\isymwrapper.dl
l
Program.boo(10,7): Internal compiler error on node 'h': System.ArgumentNullException: Value cann
ot be null.
Parameter name: local
at System.Reflection.Emit.ILGenerator.Emit(OpCode opcode, LocalBuilder local)
at Boo.Lang.Compiler.Steps.EmitAssembly.OnReferenceExpression(ReferenceExpression node)
at Boo.Lang.Compiler.Ast.ReferenceExpression.Accept(IAstVisitor visitor)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
Leaving Boo.Lang.Compiler.Steps.EmitAssembly
Program.boo(10,7): BCE0055: Boo.Lang.Compiler.CompilerError: Internal compiler error: Value cannot b
e null.
Parameter name: local. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: local
at System.Reflection.Emit.ILGenerator.Emit(OpCode opcode, LocalBuilder local)
at Boo.Lang.Compiler.Steps.EmitAssembly.OnReferenceExpression(ReferenceExpression node)
at Boo.Lang.Compiler.Ast.ReferenceExpression.Accept(IAstVisitor visitor)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
— End of inner exception stack trace —
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.OnError(Node node, Exception error)
at Boo.Lang.Compiler.Steps.AbstractVisitorCompilerStep.OnError(Node node, Exception error)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
at Boo.Lang.Compiler.Steps.EmitAssembly.EmitRawBranchTrue(Expression expression, Label label)
at Boo.Lang.Compiler.Steps.EmitAssembly.EmitBranchTrue(BinaryExpression expression, Label label)
at Boo.Lang.Compiler.Steps.EmitAssembly.EmitBranchTrue(Expression expression, Label label)
at Boo.Lang.Compiler.Steps.EmitAssembly.OnWhileStatement(WhileStatement node)
at Boo.Lang.Compiler.Ast.WhileStatement.Accept(IAstVisitor visitor)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node[] array)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(NodeCollection collection)
at Boo.Lang.Compiler.Steps.EmitAssembly.OnBlock(Block block)
at Boo.Lang.Compiler.Ast.Block.Accept(IAstVisitor visitor)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
at Boo.Lang.Compiler.Steps.EmitAssembly.OnMethod(Method method)
at Boo.Lang.Compiler.Ast.Method.Accept(IAstVisitor visitor)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node[] array)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(NodeCollection collection)
at Boo.Lang.Compiler.Steps.EmitAssembly.EmitTypeDefinition(TypeDefinition node)
at Boo.Lang.Compiler.Steps.EmitAssembly.OnClassDefinition(ClassDefinition node)
at Boo.Lang.Compiler.Ast.ClassDefinition.Accept(IAstVisitor visitor)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node[] array)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(NodeCollection collection)
at Boo.Lang.Compiler.Steps.EmitAssembly.OnModule(Module module)
at Boo.Lang.Compiler.Steps.EmitAssembly.DefineTypes()
at Boo.Lang.Compiler.Steps.EmitAssembly.Run()
at Boo.Lang.Compiler.CompilerPipeline.RunStep(CompilerContext context, ICompilerStep step)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Rodrigo B. de Oliveira - 19/Apr/06 10:25 PM
A hard one!

Thanks for the report!