summaryrefslogtreecommitdiff
path: root/cpp/test/Slice/errorDetection/IllegalDictionary.ice
blob: 6fdb87fc92be70114b70a3e603ef8f55f10e3023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// **********************************************************************
//
// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************



module Test
{

dictionary<bool, long> d1;              // OK
dictionary<byte, long> d2;              // OK
dictionary<short, long> d3;             // OK
dictionary<int, long> d4;               // OK
dictionary<long, long> d5;              // OK
dictionary<string, long> d6;            // OK

dictionary<float, long> b1;             // Bad
dictionary<double, long> b2;            // Bad
dictionary<Object, long> b3;            // Bad
dictionary<Object*, long> b4;           // Bad
dictionary<LocalObject, long> b5;       // Bad

sequence<byte> s1;
dictionary<s1, long> d7;                // Deprecated

sequence<float> s2;
dictionary<s2, long> b6;                // Bad

sequence<s1> s3;
dictionary<s3, long> b7;                // Deprecated

struct st1
{
    long x;
    long y;
};
dictionary<st1, long> d8;               // OK

struct st2
{
    long x;
    float y;
};
dictionary<st2, long> b8;               // Bad

enum e { e1, e2 };
dictionary<e, long> d9;                 // OK

sequence<e> s4;
dictionary<s4, long> d10;               // Deprecated

dictionary<d9, long> b9;                // Bad

};