Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-bridge/blob/main/tests/refusals.json # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-bridge / tests / refusals.json` 272 lines ยท 7442 bytes Raw Blame History 1 [ 2 { 3 "name": "seed_1", 4 "source": "fn f a uint to uint\nret add a q\nend\n", 5 "error": 3, 6 "reason": "unknown name" 7 }, 8 { 9 "name": "seed_2", 10 "source": "fn f a uint b ulong to ulong\nret add a b\nend\n", 11 "error": 7, 12 "reason": "20: no implicit widening" 13 }, 14 { 15 "name": "seed_3", 16 "source": "fn f a ulong to uint\nret a\nend\n", 17 "error": 7, 18 "reason": "20: no implicit narrowing" 19 }, 20 { 21 "name": "seed_4", 22 "source": "fn f a view uchar to uint\nret 0\nend\n", 23 "error": 16, 24 "reason": "16: an array without its length" 25 }, 26 { 27 "name": "seed_5", 28 "source": "global g uchar\nfn main to int\nret 0\nend\n", 29 "error": 16, 30 "reason": "16: a pool without its length" 31 }, 32 { 33 "name": "seed_6", 34 "source": "fn s a edit uint 4 b edit uint 4 to void\nend\nfn f to uint\nx = new uint 4 0\ns x x\nfree x\nret 0\nend\n", 35 "error": 19, 36 "reason": "18: one array twice in a call" 37 }, 38 { 39 "name": "seed_7", 40 "source": "global g uint 4\nfn s a view uint 4 to uint\nret get a 0\nend\nfn main to int\nr = s g\nret 0\nend\n", 41 "error": 19, 42 "reason": "18: a global passed" 43 }, 44 { 45 "name": "seed_8", 46 "source": "fn s a view uint 4 to void\nput a 0 1\nend\n", 47 "error": 20, 48 "reason": "17: write through a view" 49 }, 50 { 51 "name": "seed_9", 52 "source": "text t \"ab\"\nfn main to int\nput t 0 1\nret 0\nend\n", 53 "error": 20, 54 "reason": "17: write into a text" 55 }, 56 { 57 "name": "seed_10", 58 "source": "text t \"ab\"\nfn main to int\nn = read 0 t 0 1\nret 0\nend\n", 59 "error": 20, 60 "reason": "17: read into a text" 61 }, 62 { 63 "name": "seed_11", 64 "source": "fn s a edit uint 4 to void\nend\nfn f a view uint 4 to uint\ns a\nret 0\nend\n", 65 "error": 20, 66 "reason": "17: an edit argument from a view" 67 }, 68 { 69 "name": "seed_12", 70 "source": "fn main to int\nx = new uint 4 0\nr = get x 4\nret 0\nend\n", 71 "error": 21, 72 "reason": "23: a number index outside the array" 73 }, 74 { 75 "name": "seed_13", 76 "source": "fn s a view uint 4 to uint\nret 0\nend\nfn f to uint\nx = new uint 5 0\nr = s x\nret r\nend\n", 77 "error": 7, 78 "reason": "17: an array of another shape" 79 }, 80 { 81 "name": "seed_14", 82 "source": "text t \"a\\qb\"\nfn main to int\nret 0\nend\n", 83 "error": 22, 84 "reason": "19: an escape with no meaning" 85 }, 86 { 87 "name": "seed_15", 88 "source": "text t \"ab\nfn main to int\nret 0\nend\n", 89 "error": 22, 90 "reason": "a text with no end" 91 }, 92 { 93 "name": "seed_16", 94 "source": "global g ulong `16777217`\nfn main to int\nret 0\nend\n", 95 "error": 23, 96 "reason": "24: a pool over its limit" 97 }, 98 { 99 "name": "seed_17", 100 "source": "fn main to int\nx = new ulong 600000 0\nret 0\nend\n", 101 "error": 23, 102 "reason": "24: local arrays over 4 MiB" 103 }, 104 { 105 "name": "seed_18", 106 "source": "fn f a uint to uint\nret a\nx = a\nend\n", 107 "error": 17, 108 "reason": "a line after ret" 109 }, 110 { 111 "name": "seed_19", 112 "source": "fn f a uint to uint\nif eq a 0\nret 1\nend\nend\n", 113 "error": 18, 114 "reason": "a value function that can reach its end" 115 }, 116 { 117 "name": "seed_20", 118 "source": "fn f a uint to uint\nret f a\nend\n", 119 "error": 9, 120 "reason": "a self-call in function mode (stack use bounded by the call order)" 121 }, 122 { 123 "name": "seed_21", 124 "source": "global g uint 4\nfn f a uint to uint\nret a\nend\n", 125 "error": 9, 126 "reason": "a pool in function mode" 127 }, 128 { 129 "name": "seed_22", 130 "source": "fn main to int\nif true\nx = new uint 4 0\nend\nret 0\nend\n", 131 "error": 9, 132 "reason": "new inside a block" 133 }, 134 { 135 "name": "seed_23", 136 "source": "fn main a int to int\nret a\nend\n", 137 "error": 9, 138 "reason": "main with parameters" 139 }, 140 { 141 "name": "seed_24", 142 "source": "fn s a edit int 2 to void\nput a 1 9\nend\nfn main to int\nx = new int 2 0\ns view x\nret get x 1\nend\n", 143 "error": 20, 144 "reason": "17: view A to an edit parameter (L412 probe view_pfx_to_edit)" 145 }, 146 { 147 "name": "seed_25", 148 "source": "fn main to int\nx = ulong -1\nret 0\nend\n", 149 "error": 8, 150 "reason": "20: a negative number is not a ulong" 151 }, 152 { 153 "name": "seed_26", 154 "source": "fn main to int\nx = long `9223372036854775808`\nret 0\nend\n", 155 "error": 8, 156 "reason": "20: 2^63 is not a long" 157 }, 158 { 159 "name": "seed_27", 160 "source": "fn main to int\nx = byte `18446744073709551615`\nret 0\nend\n", 161 "error": 8, 162 "reason": "20: 2^64 - 1 is not a byte (no wrap to -1)" 163 }, 164 { 165 "name": "seed_28", 166 "source": "fn main to int\nx = ulong `18446744073709551616`\nret 0\nend\n", 167 "error": 8, 168 "reason": "23: 2^64 is no whole number of any type" 169 }, 170 { 171 "name": "seed_29", 172 "source": "fn main to int\nx = ulong `100000000000000000000`\nret 0\nend\n", 173 "error": 6, 174 "reason": "a number of 21 digits" 175 }, 176 { 177 "name": "seed_30", 178 "source": "global g uchar `9223372036854775808`\nfn main to int\nret 0\nend\n", 179 "error": 23, 180 "reason": "24: a pool of 2^63 elements is over its limit" 181 }, 182 { 183 "name": "seed_31", 184 "source": "fn main to int\nx = new uint 4 0\nfree x\nret 0\nend\n", 185 "error": 9, 186 "reason": "24: free is not a word (no heap, nothing given back by hand)" 187 }, 188 { 189 "name": "seed_32", 190 "source": "fn f a int b int to int\nret 0\nend\nfn g to int\nx = own a\nret 0\nend\n", 191 "error": 9, 192 "reason": "own is not in the subset" 193 }, 194 { 195 "name": "seed_33", 196 "source": "fn f a uint to uint\nret a\nend\nfn g f uint to uint\nret f\nend\n", 197 "error": 10, 198 "reason": "a name equal to a function" 199 }, 200 { 201 "name": "seed_34", 202 "source": "fn f a uint to uint\nabcdefghi = a\nret a\nend\n", 203 "error": 13, 204 "reason": "a variable over 8 characters" 205 }, 206 { 207 "name": "seed_35", 208 "source": "fn f a uint to uint\nret a\n", 209 "error": 15, 210 "reason": "a function without end" 211 }, 212 { 213 "name": "seed_36", 214 "source": "end\n", 215 "error": 16, 216 "reason": "end outside a function" 217 }, 218 { 219 "name": "seed_37", 220 "source": "ret 5\n", 221 "error": 16, 222 "reason": "a statement outside a function" 223 }, 224 { 225 "name": "seed_38", 226 "source": "fn f a uint to uint\nret add a 12x\nend\n", 227 "error": 6, 228 "reason": "bad number" 229 }, 230 { 231 "name": "seed_39", 232 "source": "fn f to void\nret\nend\nfn g to uint\nx = f\nret 0\nend\n", 233 "error": 7, 234 "reason": "a void function used as a value" 235 }, 236 { 237 "name": "seed_40", 238 "source": "fn f to uint\nret 1\nend\nfn g to void\nf\nend\n", 239 "error": 7, 240 "reason": "a value function called as a statement" 241 }, 242 { 243 "name": "empty", 244 "source": "", 245 "error": null 246 }, 247 { 248 "name": "five_params", 249 "source": "fn f a ulong b ulong c ulong d ulong e ulong to ulong\nret a\nend\nfn main to int\nret int f 1 2 3 4 5\nend\n", 250 "backend_error": 24 251 }, 252 { 253 "name": "long_name", 254 "source": "fn toolongname to int\nret 0\nend\nfn main to int\nret toolongname\nend\n", 255 "backend_error": 13 256 }, 257 { 258 "name": "library_io", 259 "source": "fn f a edit uchar 4 to long\nret read 0 a 0 4\nend\n", 260 "backend_error": 24 261 }, 262 { 263 "name": "library_array_width", 264 "source": "fn f a view short 4 to short\nret get a 0\nend\n", 265 "backend_error": 24 266 }, 267 { 268 "name": "local_storage_limit", 269 "source": "fn main to int\na = new ushort 20000 0\nret 0\nend\n", 270 "backend_error": 23 271 } 272 ]