# # Invalid SLUL library with errors, for test purposes # # Copyright © 2023-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 badlib \type library \version 0.2.0 \depends error_support_unver 1.0 unstable_api \depends with_func 1.0 nestedonly \depends with_typeident3 1.0 \depends with_type_diff2 1.0 \depends conflict1 1.1 \depends conflict2 1.1 \interface_depends use_nested 1.0 since 0.1.0 \interface_depends use_unavailable_versions 1.0 since 0.1.0 \interface_depends with_type 1.0 nestedonly since 0.1.0 \interface_depends with_type_diff1 1.0 nestedonly since 0.1.0 \interface_depends with_typeident1 1.0 nestedonly since 0.1.0 \interface_depends with_typeident3 1.0 nestedonly since 0.1.0 \interface_depends with_typeident_diff1 1.0 since 0.1.0 \interface_depends error_support_ver 1.2 since 0.1.1 \api_def 0.1.0 \api_def 0.1.1 \api_def 0.2.0 \api_def 0.1.1.1 \source versioned_impls.slul since 0.1.0 type UseNestedOnly = struct { # ERROR .9: error: Type 'TypeInLib' does not exist ref TypeInLib thing } since 0.1.0 data int use_nested1 = externaltype_value.x since 0.1.0 data NestedType use_nested2 = (.field = .nested_typeident_in_usenested) since 0.1.0 data NestedType use_nested3 = (.field = .nested_typeident_onehidden) # This typeident is in module "with_typeident3", which is nestedonly # ERROR +2.42: error: ".nested_typeident_in_withtypeident3" does not exist in the target type since 0.1.0 data NestedType use_nested4 = (.field = .nested_typeident_in_withtypeident3) since 0.1.0 type BadVersion1 = struct { int x since 0.1.1 int y # ERROR .5: error: All struct/enum members after a versioned one must also be versioned int z } since 0.1.0 type BadVersion2 = struct { int x since 0.1.1.1 int y # ERROR .5: error: struct/enum members do not come in chronological version order since 0.1.1 int z } since 0.1.1 type BadVersion3 = struct { struct { int x # ERROR .9: error: "since" cannot appear in nested types since 0.1.1.1 int y } nested } since 0.1.1 type BadVersion4 = closed struct { int x # ERROR .5: error: closed types cannot have since-versions inside since 0.1.1.1 int y } since 0.1.0 type BadLibClosedType = closed struct { int x } # ERROR .8: error: since {} must contain at least one version since {} data int bad_versioned_data = 123 # ERROR +2.7: error: Identifier value is not known at compile-time since 0.1.1 data [external_value_ver]int typechk_array_extlen # ERROR +2.7: error: No implementation of 'missing_funcimpl_typeident_class' found in \source files (class 'BadVersion4' does not exist there) since 0.1.0 func .missing_funcimpl_typeident_class() -> BadVersion4 # ERROR +2.7: error: No implementation of 'missing_funcimpl_typeident' found in \source files since 0.1.0 func .missing_funcimpl_typeident() -> ref BadVersion1 # ERROR +2.18: error: No implementation of 'missing_funcimpl_class' found in \source files (class 'BadVersion4' does not exist there) since 0.1.0 func BadVersion4.missing_funcimpl_class() -> bool # ERROR +2.18: error: No implementation of 'missing_funcimpl' found in \source files since 0.1.0 func BadVersion1.missing_funcimpl() -> bool # ERROR +2.19: error: No implementation of 'missing_dataimpl_class' found in \source files (class 'BadVersion4' does not exist there) since 0.1.0 data BadVersion4 .missing_dataimpl_class # ERROR +2.24: error: No implementation of 'missing_dataimpl' found in \source files since 0.1.0 data BadLibClosedType .missing_dataimpl # ERROR .2: error: Top-levels should start at column 1 on a new line since 0.1.0 type IndentedSinceVer = bool # TODO add error checks for items that refer to future versions # ERROR .12: error: Unexpected end of file since 0.1.0