aboutsummaryrefslogtreecommitdiff
path: root/tests/somelib/toplevels.slul
blob: 867904c88aa6436a5deed470a4f8f14676dc3d12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

#
# Test library - Top-level (class-less) functions
#
# Copyright © 2026 Samuel Lidén Borell <samuel@kodafritt.se>
#
# SPDX-License-Identifier: EUPL-1.2+ OR LGPL-2.1-or-later
#

func somelib_toplevel
    bool b
    int x
    int y
return
    int r
code
    if b
        assert x > 0
        return x
    else
        return y
    end
end