/****************************************************************************** * Copyright (c) 2000-2014 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ module untag2 { //^In TTCN-3 module `untag2':// type record u2 { //^In type definition// integer i, //^Due to this UNTAGGED component// charstring s, //^error: More than one UNTAGGED character-encodable field// \ //^error: All the other components should be ATTRIBUTE or ANY-ATTRIBUTE// universal charstring u //^error: More than one UNTAGGED character-encodable field// } with { variant (i, s, u) "untagged" } type record u3 { record of integer f1, record of integer f2 } with { variant (f1,f2) "untagged"; // this can not be decoded! TODO: add diagnostic } type record u4 { record {} f1 } with { // untagged + "name as" is rather redundant, // but the compiler doesn't report it variant (f1) "untagged" variant (f1) "name as 'f2'" } } with { encode "XML"; }