Rev | Line | |
---|
[4] | 1 | module checkNoModifiedTemplateOfModifiedTemplate { |
---|
| 2 | type record MyRecordType { |
---|
| 3 | integer field1 optional, |
---|
| 4 | charstring field2, |
---|
| 5 | boolean field3 |
---|
| 6 | } |
---|
| 7 | |
---|
| 8 | template MyRecordType MyTemplate1 := { |
---|
| 9 | field1 := 123, |
---|
| 10 | field2 := "A string", |
---|
| 11 | field3 := true |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | template MyRecordType MyTemplate2 modifies MyTemplate1 := { |
---|
| 15 | field1 := omit, |
---|
| 16 | field2 := "A modified string" |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | // MyTemplate2 is already a modified template |
---|
| 20 | template MyRecordType MyTemplate3 modifies MyTemplate2 := { |
---|
| 21 | field1 := 22 |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | // this one is even modified two times |
---|
| 25 | template MyRecordType MyTemplate4 modifies MyTemplate3 := { |
---|
| 26 | field3 := false |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | // NESTED TEMPLATES |
---|
| 30 | type record MyRecordType2 { |
---|
| 31 | integer field1 optional, |
---|
| 32 | charstring field2, |
---|
| 33 | boolean field3, |
---|
| 34 | MyRecordType nestedTemplate |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | template MyRecordType MyNestedTemplate1 := { |
---|
| 38 | field1 := 123, |
---|
| 39 | field2 := "A string", |
---|
| 40 | field3 := true, |
---|
| 41 | nestedTemplate :={field1:= 1, field2:="a", field3:=true} |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | template MyRecordType MyNestedTemplate2 modifies MyNestedTemplate1 := { |
---|
| 47 | field2 := "B string", |
---|
| 48 | nestedTemplate :={field1:= 2, field2:="b", field3:=true} |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | template MyRecordType MyNestedTemplate3 modifies MyNestedTemplate2 := { |
---|
| 52 | field2 := "C string", |
---|
| 53 | nestedTemplate :={field1:= 3, field2:="c", field3:=true} |
---|
| 54 | } |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.