cuelang.org/go@v0.10.1/internal/core/runtime/testdata/errors.txtar (about)

     1  -- cue.mod/modules.cue --
     2  
     3  -- invalid_file_attr.cue --
     4  @extern("test" foo)
     5  
     6  package foo
     7  
     8  -- invalid_field_attr.cue --
     9  
    10  @extern("test")
    11  
    12  // Foo
    13  
    14  package foo
    15  
    16  Fn1: _ @test("file1.xx" abi sig)
    17  
    18  -- empty_extern.cue --
    19  @extern()
    20  
    21  package foo
    22  
    23  Fn2: _ @test("file1.xx" abi sig)
    24  
    25  
    26  -- unknown_interpreter.cue --
    27  @extern("wazem")
    28  
    29  package foo
    30  
    31  Fn3: _ @wazem("file1.xx" abi sig)
    32  
    33  -- double_extern_a.cue --
    34  @extern("test")
    35  @extern("test")
    36  
    37  package foo
    38  
    39  Fn4a: _ @test("file1.xx")
    40  
    41  -- double_extern_b.cue --
    42  @extern("test")
    43  @extern("test")
    44  @extern("test")
    45  
    46  package foo
    47  
    48  Fn4b: _ @test("file1.xx")
    49  
    50  -- package_attr.cue --
    51  @extern("test")
    52  
    53  package foo
    54  
    55  @test("file1.xx")
    56  Fn5: _
    57  
    58  -- duplicate.cue --
    59  @extern("test")
    60  
    61  package foo
    62  
    63  
    64  Fn6: _ @test("file1.xx",sig=func(int)int) @test("file1.xx", sig=func(int)bool)
    65  
    66  Fn7: {
    67  	@test("file1.xx",sig=func(int)int)
    68  	_
    69  } @test("file1.xx", sig=func(int)bool)
    70  
    71  -- non_ident.cue --
    72  @extern("test")
    73  
    74  package foo
    75  
    76  
    77  "a-b": _ @test("file1.xx",sig=func(int)int)
    78  
    79  [string]: _ @test("file1.xx",sig=func(int)int)
    80  
    81  -- late_extern.cue --
    82  package foo
    83  
    84  @extern("test")
    85  
    86  
    87  Foo: _ @test(file1.xx, abi=c, sig="func(int)int")
    88  
    89  -- out/extern --
    90  only one file-level extern attribute allowed per file:
    91      ./double_extern_a.cue:2:1
    92  only one file-level extern attribute allowed per file:
    93      ./double_extern_b.cue:2:1
    94  duplicate @test attributes:
    95      ./duplicate.cue:6:43
    96  duplicate @test attributes:
    97      ./duplicate.cue:11:3
    98  interpreter name must be non-empty:
    99      ./empty_extern.cue:1:1
   100  no interpreter defined for "\"test\" foo":
   101      ./invalid_file_attr.cue:1:1
   102  extern attribute must appear before package clause:
   103      ./late_extern.cue:3:1
   104  can only define functions for fields with identifier names, found "a-b":
   105      ./non_ident.cue:6:10
   106  can only define functions for fields with identifier names, found [string]:
   107      ./non_ident.cue:8:13
   108  @test attribute not associated with field:
   109      ./package_attr.cue:5:1
   110  no interpreter defined for "wazem":
   111      ./unknown_interpreter.cue:1:1