[vala] Report error when trying to use stacked arrays
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Report error when trying to use stacked arrays
- Date: Sat, 16 Oct 2010 13:36:03 +0000 (UTC)
commit cc435dd6ec069b87e986fa454e80e5fe80a0df72
Author: Jürg Billeter <j bitron ch>
Date: Sat Oct 16 15:17:23 2010 +0200
Report error when trying to use stacked arrays
Stacked array support was never completed. Report an error instead of
generating incorrect C code.
Fixes bug 546603, bug 548428, bug 548429, bug 565865, bug 565872,
bug 571322, bug 572649, and bug 576611.
codegen/valaccodebasemodule.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 9de9b53..9d4ce74 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3949,7 +3949,9 @@ public class Vala.CCodeBaseModule : CodeGenerator {
var array_type = type as ArrayType;
if (array_type != null) {
check_type (array_type.element_type);
- if (array_type.element_type is DelegateType) {
+ if (array_type.element_type is ArrayType) {
+ Report.error (type.source_reference, "Stacked arrays are not supported");
+ } else if (array_type.element_type is DelegateType) {
var delegate_type = (DelegateType) array_type.element_type;
if (delegate_type.delegate_symbol.has_target) {
Report.error (type.source_reference, "Delegates with target are not supported as array element type");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]