-- cue.mod/modules.cue --

-- invalid_file_attr.cue --
@extern("testfn" foo)

package foo

-- invalid_field_attr.cue --

@extern("testfn")

// Foo

package foo

Fn1: _ @testfn("file1.xx" abi sig)

-- empty_extern.cue --
@extern()

package foo

Fn2: _ @testfn("file1.xx" abi sig)


-- unknown_interpreter.cue --
@extern("wazem")

package foo

Fn3: _ @wazem("file1.xx" abi sig)

-- double_extern_a.cue --
@extern("testfn")
@extern("testfn")

package foo

Fn4a: _ @testfn("file1.xx")

-- double_extern_b.cue --
@extern("testfn")
@extern("testfn")
@extern("testfn")

package foo

Fn4b: _ @testfn("file1.xx")

-- package_attr.cue --
@extern("testfn")

package foo

@testfn("file1.xx")
Fn5: _

-- duplicate.cue --
@extern("testfn")

package foo


Fn6: _ @testfn("file1.xx",sig=func(int)int) @testfn("file1.xx", sig=func(int)bool)

Fn7: {
	@testfn("file1.xx",sig=func(int)int)
	_
} @testfn("file1.xx", sig=func(int)bool)

-- non_ident.cue --
@extern("testfn")

package foo


("something"): _ @testfn("file1.xx",sig=func(int)int)

[string]: _ @testfn("file1.xx",sig=func(int)int)

-- late_extern.cue --
package foo

@extern("testfn")


Foo: _ @testfn(file1.xx, abi=c, sig="func(int)int")

-- out/extern --
duplicate @extern attribute for kind "testfn":
    ./double_extern_a.cue:2:1
duplicate @extern attribute for kind "testfn":
    ./double_extern_b.cue:2:1
duplicate @extern attribute for kind "testfn":
    ./double_extern_b.cue:3:1
injection name must be non-empty:
    ./empty_extern.cue:1:1
no injection defined for "\"testfn\" foo":
    ./invalid_file_attr.cue:1:1
extern attribute must appear before package clause:
    ./late_extern.cue:3:1
no injection defined for "wazem":
    ./unknown_interpreter.cue:1:1
