diff -r 9308d52205a0 -r bab29bcec7fe src/SemanticAnalysis.cpp --- a/src/SemanticAnalysis.cpp Sun Sep 16 19:02:23 2012 -0700 +++ b/src/SemanticAnalysis.cpp Sun Sep 16 21:34:10 2012 -0700 @@ -1420,13 +1420,22 @@ } else { Local actual(zone_, type->parameterAt(i)); - if (expression->isIndexExpression() && actual->isArray()) { - // We special case the ability to pass x[y] into x[], which - // creates an array slice. We only do this if we know the - // assignment would otherwise not type-check. - IndexExpression *index = expression->toIndexExpression(); - if (index->left()->type()->levels() == actual->levels()) - given = index->left()->type(); + if (expression->isIndexExpression()) { + // Disabled until we can make it work. +#if 0 + if (actual->isArray()) { + // We special case the ability to pass x[y] into x[], which + // creates an array slice. We only do this if we know the + // assignment would otherwise not type-check. + IndexExpression *index = expression->toIndexExpression(); + if (index->left()->type()->levels() == actual->levels()) + given = index->left()->type(); + } else +#endif + if (actual->isReference()) { + cc_.reportError(expression->pos(), Message_CannotComputeIndexRef); + return; + } } if (!typeCheckParameter(expression, given, actual))