aboutsummaryrefslogtreecommitdiffhomepage
path: root/errortest/slul-interfaces/error_support_ver.slul
blob: ed0879648c231f8670c5c3124f7e92c1dce0eee4 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105

#
# Supporting definitions for the error tests (versioned)
#
# Copyright © 2022-2024 Samuel Lidén Borell <samuel@kodafritt.se>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

\slul 0.0.0
\name error_support_ver
\type library
\version 2.1
# TODO reverse the order of API hash and version? (for proper visual alignment)
\api_def 0.9   DummyApiHash09009009009009009009
\api_def 0.9.0.1 DummyApiHash09a09a09a09a09a09a09
\api_def 1.0   DummyApiHash01234567890123456789
\api_def 1.1   DummyApiHash11011011011011011011
\api_def 2.0   DummyApiHash20020020020020020020
# some relases on an old branch
\api_def 1.2   DummyApiHash12012012012012012012
\api_def 1.3   DummyApiHash12012012012012012012
# some patch releases
\api_def 0.9.1 DummyApiHash09109109109109109109
\api_def 1.2.1 DummyApiHash12012012012012012012
\api_def 2.0.1 DummyApiHash20120120120120120120
\api_def 2.1   DummyApiHash21021021021021021021
\api_def 2.2   DummyApiHash21021021021021021021

since 1.0
data usize external_value_ver

since 1.0
type PrivTypeVer
since 1.0
type OpenTypeVer = struct {
    int x
}
since 1.0
type ClosedTypeVer = closed struct {
    int x
}
since 1.0
type FuncTypeVer = funcref(int x) -> bool

since 0.9.1
type TypeSince091
since 2.0
type TypeSince20
since 0.9.1
func func_since_091(int x)
since 2.0
func func_since_20(int x)
since 0.9.1
data int external_value_since_091
since 2.0
data int external_value_since_20
since 0.9
type VersionedEnum = enum {
    a
    since 0.9.0.1
    b
    since 0.9.1
    c_since091
    # Adding a field in 2.0 here would be an error,
    # since the fields must come in chronological order.
    since 2.1
    d_since21
}
since 0.9
data VersionedEnum versioned_enum = .a
since 0.9.1
data VersionedEnum versioned_enum_091 = .c_since091
since 0.9
type VersionedStruct = struct {
    int a
    since 0.9.0.1
    bool b
    since 0.9.1
    byte c_since091
    since 2.1
    byte d_since21
}
# XXX "ref var" is an impossible combination in functions without paramters!
since 1.0
func .defaults() -> ref var VersionedStruct
since 2.0
func .defaults_20() -> ref var VersionedStruct
since 0.9.1
func .defaults_091() -> ref var VersionedStruct