nddrylliog/rock — Issue #364: Passing a multiple variable definition as an if condition causes rock to segfault
Author: shamanas
Created: 2012-02-11 14:38:52+00:00
State: open

Recently I have been making a compiler for a toy Greek programming language (practise before I jump on oc :) ) and I used nagaqueen + rock's AstBuilder type as a template for my fronted. While studying AstBuilder, I bumped into this:

// FIXME: Better detection to avoid 'stack' being passed as a Statement to, say, an If

In AstBuilder's onVarDeclEnd method. Intrigued, I tried to compile the following code, wich caused rock to segfault.

if(a,b: Int = 1) {
"true" println()
}

This code also segaults when we replace the if statement by a while statement.