1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:6.2.7, wrong index type applied to an array on the left hand side of an assignment
13 ** @verdict pass reject
14 ***************************************************/
16 // The following requirement is tested:
17 // Indexed value notation can be used on both the right-hand side and left-hand
18 // side of assignments. The index of the first element shall be zero or the lower
19 // bound if an index range has been given.
20 // [from 3.1] index notation: notation to access individual elements of record of,
21 // set of, array and string values or templates, where the element to be accessed
22 // is identified explicitly by an index value enclosed in square brackets ("[" and
23 // "]") which specifies the position of that element within the referenced value
24 // or template and the index value is either an integer value, array of integers
25 // or record of integers.
27 module NegSem_060207_arrays_006 {
29 type component GeneralComp {
32 type integer MyArrayType1[5] (1 .. 10);
34 testcase TC_NegSem_060207_arrays_006() runs on GeneralComp {
36 var MyArrayType1 v_array1 := { 8, 9, 2, 3, 4};
37 v_array1["0"] := 10; // error expected
42 execute(TC_NegSem_060207_arrays_006());