# # Supporting definitions for the error tests (versioned) # # Copyright © 2022-2024 Samuel Lidén Borell # # 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