diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_string_declare_and_use_var.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_string_declare_and_use_var.snap deleted file mode 100644 index 6f494af66..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_string_declare_and_use_var.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/bit_arrays.rs -assertion_line: 112 -expression: "pub fn go(x) {\n let <> = x\n name\n}" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([go/1]). - --spec go(bitstring()) -> bitstring(). -go(X) -> - <> = X, - Name. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_string_discard.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_string_discard.snap deleted file mode 100644 index c861780b5..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_string_discard.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/bit_arrays.rs -assertion_line: 84 -expression: "\npub fn bitstring_discard(x) -> Bool {\n case x {\n <<_:utf8, rest:binary>> -> True\n _ -> False\n }\n}\n " ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([bitstring_discard/1]). - --spec bitstring_discard(bitstring()) -> boolean(). -bitstring_discard(X) -> - case X of - <<_/utf8, Rest/binary>> -> - true; - - _ -> - false - end. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_string_discard1.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_string_discard1.snap deleted file mode 100644 index b48f1b328..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_string_discard1.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/bit_arrays.rs -assertion_line: 98 -expression: "\npub fn bitstring_discard(x) -> Bool {\n case x {\n <<_discardme:utf8, rest:binary>> -> True\n _ -> False\n }\n}\n " ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([bitstring_discard/1]). - --spec bitstring_discard(bitstring()) -> boolean(). -bitstring_discard(X) -> - case X of - <<_/utf8, Rest/binary>> -> - true; - - _ -> - false - end. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings.snap deleted file mode 100644 index 217923bd5..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/bit_arrays.rs -assertion_line: 5 -expression: "pub fn main() {\n let a = 1\n let simple = <<1, a>>\n let complex = <<4:int-big, 5.0:little-float, 6:native-int>>\n let <<7:2, 8:size(3), b:binary-size(4)>> = <<1>>\n let <> = <<1>>\n\n simple\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([main/0]). - --spec main() -> bitstring(). -main() -> - A = 1, - Simple = <<1, A>>, - Complex = <<4/integer-big, 5.0/little-float, 6/native-integer>>, - <<7:2, 8:3, B:4/binary>> = <<1>>, - <> = <<1>>, - Simple. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings1.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings1.snap deleted file mode 100644 index 286cc5cdd..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings1.snap +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/bit_arrays.rs -assertion_line: 32 -expression: "pub fn x() { 2 }\nfn main() {\n let a = -1\n let b = <>\n\n b\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([x/0]). - --spec x() -> integer(). -x() -> - 2. - --spec main() -> bitstring(). -main() -> - A = -1, - B = <>, - B. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings2.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings2.snap deleted file mode 100644 index 604f1dfad..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings2.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/bit_arrays.rs -assertion_line: 46 -expression: "pub fn main() {\n let a = 1\n let <> = <<1, a>>\n b\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([main/0]). - --spec main() -> integer(). -main() -> - A = 1, - <> = <<1, A>>, - B. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings3.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings3.snap deleted file mode 100644 index fad6aebcf..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings3.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/bit_arrays.rs -assertion_line: 58 -expression: "pub fn main() {\n let a = <<\"test\":utf8>>\n let <> = a\n b\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([main/0]). - --spec main() -> integer(). -main() -> - A = <<"test"/utf8>>, - <> = A, - B. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings4.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings4.snap deleted file mode 100644 index 161d88990..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings4.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/bit_arrays.rs -assertion_line: 70 -expression: "fn x() { 1 }\npub fn main() {\n let a = <>\n a\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([main/0]). - --spec x() -> integer(). -x() -> - 1. - --spec main() -> bitstring(). -main() -> - A = <<(x())/integer>>, - A. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings_float.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings_float.snap deleted file mode 100644 index c05394d84..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__bit_arrays__bit_strings_float.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/bit_arrays.rs -assertion_line: 21 -expression: "pub fn main() {\n let b = 16\n let floats = <<1.0:16-float, 5.0:float-32, 6.0:float-64-little, 1.0:float-size(b)>>\n let <<1.0:16-float, 5.0:float-32, 6.0:float-64-little, 1.0:float-size(b)>> = floats \n}" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([main/0]). - --spec main() -> bitstring(). -main() -> - B = 16, - Floats = <<1.0:16/float, - 5.0:32/float, - 6.0:64/float-little, - 1.0:(lists:max([(B), 0]))/float>>, - <<1.0:16/float, 5.0:32/float, 6.0:64/float-little, 1.0:B/float>> = Floats. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__case__just_zero_pattern.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__case__just_zero_pattern.snap deleted file mode 100644 index ff9b1b753..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__case__just_zero_pattern.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/case.rs -assertion_line: 54 -expression: "\npub fn main(x) {\n case x {\n 0 -> 1\n _ -> 2\n }\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars]). - --export([main/1]). - --spec main(integer()) -> integer(). -main(X) -> - case X of - 0 -> - 1; - - _ -> - 2 - end. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__pipes__pipe_in_spread.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__pipes__pipe_in_spread.snap deleted file mode 100644 index cb0d772af..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__pipes__pipe_in_spread.snap +++ /dev/null @@ -1,29 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/pipes.rs -assertion_line: 74 -expression: "pub type X {\n X(a: Int, b: Int)\n}\n\nfn id(x) {\n x\n}\n \npub fn main(x) {\n X(..x, a: 1 |> id)\n}" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). - --export([main/1]). --export_type([x/0]). - --type x() :: {x, integer(), integer()}. - --file("/root/project/test/my/mod.gleam", 5). --spec id(I) -> I. -id(X) -> - X. - --file("/root/project/test/my/mod.gleam", 9). --spec main(x()) -> x(). -main(X) -> - erlang:setelement( - 2, - X, - begin - _pipe = 1, - id(_pipe) - end - ). diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__scientific_notation.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__scientific_notation.snap deleted file mode 100644 index cdf9b7386..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__scientific_notation.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/erlang/tests.rs -expression: "\npub fn main() {\n 1.0e6\n 1.e6\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). - --export([main/0]). - --spec main() -> float(). -main() -> - 1.0e6, - 1.0e6. diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__escape_u_1.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__escape_u_1.snap deleted file mode 100644 index 9ad46e2c5..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__escape_u_1.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/strings.rs -assertion_line: 274 -expression: "\npub fn main() {\n \"\\u{1f600}\"\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). - --export([main/0]). - --spec main() -> binary(). -main() -> - <<"\x{1f600}"/utf8>>. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__escape_u_2.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__escape_u_2.snap deleted file mode 100644 index e70084dda..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__escape_u_2.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/strings.rs -assertion_line: 285 -expression: "\npub fn main() {\n \"Hello \\u{1f600}\"\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). - --export([main/0]). - --spec main() -> binary(). -main() -> - <<"Hello \x{1f600}"/utf8>>. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__not_unicode.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__not_unicode.snap deleted file mode 100644 index 797634a54..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__not_unicode.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/strings.rs -expression: "\npub fn not_unicode_escape_sequence() -> String {\n \"\\\\u{03a9}\"\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). - --export([not_unicode_escape_sequence/0]). - --spec not_unicode_escape_sequence() -> binary(). -not_unicode_escape_sequence() -> - <<"\\u{03a9}"/utf8>>. - diff --git a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__unicode.snap b/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__unicode.snap deleted file mode 100644 index e05973430..000000000 --- a/compiler-core/src/erlang/tests/snapshots/glistix_core__erlang__tests__strings__unicode.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/erlang/tests/strings.rs -expression: "\npub fn emoji() -> String {\n \"\\u{0001f600}\"\n}\n" ---- --module(my@mod). --compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). - --export([emoji/0]). - --spec emoji() -> binary(). -emoji() -> - <<(erlang:binary_to_integer(<<"0001f600">>, 16))/utf8>>. - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__bit_arrays__bit_arrays_on_js_do_not_support_bits.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__bit_arrays__bit_arrays_on_js_do_not_support_bits.snap deleted file mode 100644 index a151b6ab5..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__bit_arrays__bit_arrays_on_js_do_not_support_bits.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/bit_arrays.rs -expression: "\nfn main() {\n case <<1, 2>> {\n <> -> 1\n _ -> 0\n }\n}\n" ---- -error: Unsupported feature for compilation target - ┌─ /src/javascript/error.gleam:4:7 - │ -4 │ <> -> 1 - │ ^^^^^^ - -This bit array segment option in patterns is not supported for JavaScript compilation. diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__bit_strings__as_module_const.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__bit_strings__as_module_const.snap deleted file mode 100644 index 47452fb44..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__bit_strings__as_module_const.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/bit_strings.rs -assertion_line: 248 -expression: "\n pub const data = <<\n 0x1,\n 2,\n 2:size(16),\n 0x4:size(32),\n \"Gleam\":utf8,\n 4.2:float,\n <<\n <<1, 2, 3>>:bits,\n \"Gleam\":utf8,\n 1024\n >>:bits\n >>\n " ---- -import { toBitString, sizedInt, stringBits, float64Bits } from "../gleam.mjs"; - -export const data = toBitString([ - 0x1, - 2, - sizedInt(2, 16), - sizedInt(0x4, 32), - stringBits("Gleam"), - float64Bits(4.2), - toBitString([toBitString([1, 2, 3]).buffer, stringBits("Gleam"), 1024]).buffer, -]); - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__case_clause_guards__guards_cause_badmatch_to_render.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__case_clause_guards__guards_cause_badmatch_to_render.snap deleted file mode 100644 index d5a95f8fe..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__case_clause_guards__guards_cause_badmatch_to_render.snap +++ /dev/null @@ -1,24 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/case_clause_guards.rs -assertion_line: 5 -expression: "pub fn main(x, y) {\n case x {\n 1 -> 1\n _ if y -> 0\n }\n}\n" ---- -import { makeError } from "../gleam.mjs"; - -export function main(x, y) { - if (x === 1) { - return 1; - } else if (y) { - return 0; - } else { - throw makeError( - "case_no_match", - "my/mod", - 2, - "main", - "No case clause matched", - { values: [x] } - ) - } -} - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__block_with_function_literal.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__block_with_function_literal.snap deleted file mode 100644 index c1ad109ef..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__block_with_function_literal.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/functions.rs -expression: "pub fn main() {\n \n \n let a = fn(a) { a + 1 } (10)\n}\n" ---- -export function main() { - let a = ((a) => { return a + 1; })(10); - return a; -} - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literal_get_properly_wrapped.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literal_get_properly_wrapped.snap deleted file mode 100644 index 3285f3743..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literal_get_properly_wrapped.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/functions.rs -expression: "pub fn main() {\n fn(n) { n + 1 }(10)\n}\n" ---- -export function main() { - return ((n) => { return n + 1; })(10); -} - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literals_get_properly_wrapped-2.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literals_get_properly_wrapped-2.snap deleted file mode 100644 index 3d4d36ba9..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literals_get_properly_wrapped-2.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/functions.rs -expression: "pub fn main() {\n { fn(n) { n + 1 } }(10)\n}\n" ---- -export function main() { - return ((n) => { return n + 1; })(10); -} - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literals_get_properly_wrapped-3.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literals_get_properly_wrapped-3.snap deleted file mode 100644 index 0c001144b..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literals_get_properly_wrapped-3.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/functions.rs -expression: "pub fn main() {\n { let a = fn(n) { n + 1 } }(10)\n}\n" ---- -export function main() { - return ((n) => { return n + 1; })(10); -} - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literals_get_properly_wrapped.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literals_get_properly_wrapped.snap deleted file mode 100644 index 3285f3743..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__functions__function_literals_get_properly_wrapped.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/functions.rs -expression: "pub fn main() {\n fn(n) { n + 1 }(10)\n}\n" ---- -export function main() { - return ((n) => { return n + 1; })(10); -} - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_custom_types_do_get_rendered_in_typescript.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_custom_types_do_get_rendered_in_typescript.snap deleted file mode 100644 index 9b0b3ddcc..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_custom_types_do_get_rendered_in_typescript.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/modules.rs -assertion_line: 182 -expression: "import one/two/three.{Custom, One, Two}\n\npub fn go() -> List(Custom) { [One, Two] }\n" ---- -import type * as _ from "../gleam.d.mts"; -import type * as $three from "../one/two/three.d.mts"; - -export function go(): _.List<$three.Custom$>; - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_custom_types_dont_get_rendered.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_custom_types_dont_get_rendered.snap deleted file mode 100644 index 59d5e23ea..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_custom_types_dont_get_rendered.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/modules.rs -assertion_line: 167 -expression: "import one/two/three.{Custom, One, Two}\n\npub fn go() -> List(Custom) { [One, Two] }\n" ---- -import { toList } from "../gleam.mjs"; -import * as $three from "../one/two/three.mjs"; -import { One, Two } from "../one/two/three.mjs"; - -export function go() { - return toList([new One(), new Two()]); -} - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_external_types_dont_get_rendered.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_external_types_dont_get_rendered.snap deleted file mode 100644 index bafe93e29..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_external_types_dont_get_rendered.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/modules.rs -assertion_line: 156 -expression: "import one/two/three.{External}\n\npub fn go() { 1 }\n" ---- -import * as $three from "../one/two/three.mjs"; - -export function go() { - return 1; -} - diff --git a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_external_types_dont_get_rendered_with_value_of_same_name.snap b/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_external_types_dont_get_rendered_with_value_of_same_name.snap deleted file mode 100644 index 14405075c..000000000 --- a/compiler-core/src/javascript/tests/snapshots/glistix_core__javascript__tests__modules__imported_external_types_dont_get_rendered_with_value_of_same_name.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: compiler-core/src/javascript/tests/modules.rs -assertion_line: 197 -expression: "import one/two/three.{Thingy}\n\ntype Dup { Thingy }\n\npub fn go(x: Thingy) -> List(Thingy) { [x, x] }\n" ---- -import { toList, CustomType as $CustomType } from "../gleam.mjs"; -import * as $three from "../one/two/three.mjs"; - -class Thingy extends $CustomType {} - -export function go(x) { - return toList([x, x]); -} - diff --git a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_binary_const.snap b/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_binary_const.snap deleted file mode 100644 index 0f856794d..000000000 --- a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_binary_const.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/parse/tests.rs -assertion_line: 527 -expression: "pub const x = <<<<>>:binary>>" ---- - -warning: Deprecated bit literal option - ┌─ :1:22 - │ -1 │ pub const x = <<<<>>:binary>> - │ ^^^^^^ - -This option has been replaced by the `bytes` option. - -Hint: Run `gleam format` to auto-fix your code. - diff --git a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_binary_expression.snap b/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_binary_expression.snap deleted file mode 100644 index fb3a2aec4..000000000 --- a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_binary_expression.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/parse/tests.rs -assertion_line: 532 -expression: "pub fn main(x) {\n <>\n}" ---- - -warning: Deprecated bit literal option - ┌─ :2:7 - │ -2 │ <> - │ ^^^^^^ - -This option has been replaced by the `bytes` option. - -Hint: Run `gleam format` to auto-fix your code. - diff --git a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_binary_pattern.snap b/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_binary_pattern.snap deleted file mode 100644 index e69e03f24..000000000 --- a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_binary_pattern.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/parse/tests.rs -assertion_line: 541 -expression: "pub fn main(x) {\n let assert <> = x\n y\n}" ---- - -warning: Deprecated bit literal option - ┌─ :2:18 - │ -2 │ let assert <> = x - │ ^^^^^^ - -This option has been replaced by the `bytes` option. - -Hint: Run `gleam format` to auto-fix your code. - diff --git a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_bit_string_const.snap b/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_bit_string_const.snap deleted file mode 100644 index d5cb593eb..000000000 --- a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_bit_string_const.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/parse/tests.rs -assertion_line: 503 -expression: "pub const x = <<<<>>:bits>>" ---- - -warning: Deprecated bit literal option - ┌─ :1:22 - │ -1 │ pub const x = <<<<>>:bits>> - │ ^^^^^^^^^^ - -This option has been replaced by the `bits` option. - -Hint: Run `gleam format` to auto-fix your code. - diff --git a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_bit_string_expression.snap b/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_bit_string_expression.snap deleted file mode 100644 index 4c35338a2..000000000 --- a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_bit_string_expression.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/parse/tests.rs -assertion_line: 508 -expression: "pub fn main(x) {\n <>\n}" ---- - -warning: Deprecated bit literal option - ┌─ :2:7 - │ -2 │ <> - │ ^^^^^^^^^^ - -This option has been replaced by the `bits` option. - -Hint: Run `gleam format` to auto-fix your code. - diff --git a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_bit_string_pattern.snap b/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_bit_string_pattern.snap deleted file mode 100644 index 2b067a973..000000000 --- a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__deprecated_option_bit_string_pattern.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/parse/tests.rs -assertion_line: 517 -expression: "pub fn main(x) {\n let assert <> = x\n y\n}" ---- - -warning: Deprecated bit literal option - ┌─ :2:18 - │ -2 │ let assert <> = x - │ ^^^^^^^^^^ - -This option has been replaced by the `bits` option. - -Hint: Run `gleam format` to auto-fix your code. - diff --git a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__reserved_peek.snap b/compiler-core/src/parse/snapshots/glistix_core__parse__tests__reserved_peek.snap deleted file mode 100644 index e0a8311d0..000000000 --- a/compiler-core/src/parse/snapshots/glistix_core__parse__tests__reserved_peek.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: compiler-core/src/parse/tests.rs -assertion_line: 706 -expression: const echo = 1 ---- - -warning: Reserved word used - ┌─ :1:7 - │ -1 │ const echo = 1 - │ ^^^^ - -The word `echo` has been reserved for future use. - -If you do not rename this then your code may stop working in -a future version of Gleam. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_used_by_javascript_module.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_used_by_javascript_module.snap deleted file mode 100644 index 1f4b0137d..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_used_by_javascript_module.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "@external(erlang, \"foo\", \"bar\")\npub fn erlang_only() -> Int\n\npub fn main() {\n erlang_only()\n}\n" ---- -error: Unsupported target - ┌─ /src/one/two.gleam:5:3 - │ -5 │ erlang_only() - │ ^^^^^^^^^^^ - -This value is not available as it is defined using externals, and there is -no implementation for the JavaScript target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_with_erlang_external-2.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_with_erlang_external-2.snap deleted file mode 100644 index b9dd46020..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_with_erlang_external-2.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "@external(erlang, \"foo\", \"bar\")\npub fn erlang_only() -> Int\n\n@external(erlang, \"foo\", \"bar\")\npub fn uh_oh() -> Int {\n erlang_only()\n}\n" ---- -error: Unsupported target - ┌─ /src/one/two.gleam:6:3 - │ -6 │ erlang_only() - │ ^^^^^^^^^^^ - -This function doesn't have an implementation for the JavaScript target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_with_erlang_external.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_with_erlang_external.snap deleted file mode 100644 index 8bb8bd64e..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_with_erlang_external.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "@external(erlang, \"foo\", \"bar\")\npub fn erlang_only() -> Int\n\n@external(erlang, \"foo\", \"bar\")\npub fn uh_oh() -> Int {\n erlang_only()\n}\n" ---- -error: Unsupported target - ┌─ /src/one/two.gleam:6:3 - │ -6 │ erlang_only() - │ ^^^^^^^^^^^ - -This value is not available as it is defined using externals, and there is -no implementation for the JavaScript target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_with_javascript_external.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_with_javascript_external.snap deleted file mode 100644 index a9adc660d..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_only_function_with_javascript_external.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "\n@external(erlang, \"foo\", \"bar\")\npub fn erlang_only() -> Int\n\n@external(javascript, \"foo\", \"bar\")\npub fn all_targets() -> Int {\n erlang_only()\n}\n\npub fn main() {\n all_targets()\n}\n " ---- -error: Unsupported target - ┌─ /src/one/two.gleam:7:3 - │ -7 │ erlang_only() - │ ^^^^^^^^^^^ - -This function doesn't have an implementation for the JavaScript target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_targeted_function_cant_contain_javascript_only_function.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_targeted_function_cant_contain_javascript_only_function.snap deleted file mode 100644 index 71f9017a5..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__erlang_targeted_function_cant_contain_javascript_only_function.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "@target(erlang)\npub fn erlang_only() -> Int {\n javascript_only()\n}\n\n@external(javascript, \"foo\", \"bar\")\npub fn javascript_only() -> Int\n " ---- -error: Unsupported target - ┌─ /src/one/two.gleam:3:3 - │ -3 │ javascript_only() - │ ^^^^^^^^^^^^^^^ - -This value is not available as it is defined using externals, and there is -no implementation for the Erlang target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__imported_javascript_only_function.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__imported_javascript_only_function.snap deleted file mode 100644 index 34a529f2d..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__imported_javascript_only_function.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "import module\npub fn main() {\n module.javascript_only()\n}" ---- -error: Unsupported target - ┌─ /src/one/two.gleam:3:9 - │ -3 │ module.javascript_only() - │ ^^^^^^^^^^^^^^^^ - -This value is not available as it is defined using externals, and there is -no implementation for the Erlang target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_constant.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_constant.snap deleted file mode 100644 index 787c3fa5c..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_constant.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "import module\npub fn main() {\n module.javascript_only_constant()\n}" ---- -error: Unsupported target - ┌─ /src/one/two.gleam:3:9 - │ -3 │ module.javascript_only_constant() - │ ^^^^^^^^^^^^^^^^^^^^^^^^^ - -This value is not available as it is defined using externals, and there is -no implementation for the Erlang target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_function_used_by_erlang_module.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_function_used_by_erlang_module.snap deleted file mode 100644 index e0d781142..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_function_used_by_erlang_module.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "@external(javascript, \"foo\", \"bar\")\npub fn js_only() -> Int\n\npub fn main() {\n js_only()\n}\n" ---- -error: Unsupported target - ┌─ /src/one/two.gleam:5:3 - │ -5 │ js_only() - │ ^^^^^^^ - -This value is not available as it is defined using externals, and there is -no implementation for the Erlang target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_function_with_javascript_external-2.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_function_with_javascript_external-2.snap deleted file mode 100644 index 230a902c5..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_function_with_javascript_external-2.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "@external(javascript, \"foo\", \"bar\")\npub fn javascript_only() -> Int\n\n@external(javascript, \"foo\", \"bar\")\npub fn uh_oh() -> Int {\n javascript_only()\n}\n" ---- -error: Unsupported target - ┌─ /src/one/two.gleam:6:3 - │ -6 │ javascript_only() - │ ^^^^^^^^^^^^^^^ - -This function doesn't have an implementation for the Erlang target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_function_with_javascript_external.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_function_with_javascript_external.snap deleted file mode 100644 index 909b435fb..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_only_function_with_javascript_external.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "@external(javascript, \"foo\", \"bar\")\npub fn javascript_only() -> Int\n\n@external(javascript, \"foo\", \"bar\")\npub fn uh_oh() -> Int {\n javascript_only()\n}\n" ---- -error: Unsupported target - ┌─ /src/one/two.gleam:6:3 - │ -6 │ javascript_only() - │ ^^^^^^^^^^^^^^^ - -This value is not available as it is defined using externals, and there is -no implementation for the Erlang target. - diff --git a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_targeted_function_cant_contain_erlang_only_function.snap b/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_targeted_function_cant_contain_erlang_only_function.snap deleted file mode 100644 index 6dd99ccbd..000000000 --- a/compiler-core/src/type_/snapshots/glistix_core__type___tests__javascript_targeted_function_cant_contain_erlang_only_function.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/type_/tests.rs -expression: "@target(javascript)\npub fn javascript_only() -> Int {\n erlang_only()\n}\n\n@external(erlang, \"foo\", \"bar\")\npub fn erlang_only() -> Int\n " ---- -error: Unsupported target - ┌─ /src/one/two.gleam:3:3 - │ -3 │ erlang_only() - │ ^^^^^^^^^^^ - -This value is not available as it is defined using externals, and there is -no implementation for the JavaScript target. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string.snap deleted file mode 100644 index ec5a1990c..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 34 -expression: "case <<1>> { <<2.0, a>> -> 1 }" ---- -error: Type mismatch - ┌─ /src/one/two.gleam:1:16 - │ -1 │ case <<1>> { <<2.0, a>> -> 1 } - │ ^^^ - -Expected type: - - Int - -Found type: - - Float - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_binary.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_binary.snap deleted file mode 100644 index a32aa96de..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_binary.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 44 -expression: "case <<1>> { <> if a > 1 -> 1 }" ---- -error: Type mismatch - ┌─ /src/one/two.gleam:1:29 - │ -1 │ case <<1>> { <> if a > 1 -> 1 } - │ ^ - -Expected type: - - Int - -Found type: - - BitArray - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_float.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_float.snap deleted file mode 100644 index ddfbd11f5..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_float.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 39 -expression: "case <<1>> { <> if a > 1 -> 1 }" ---- -error: Type mismatch - ┌─ /src/one/two.gleam:1:29 - │ -1 │ case <<1>> { <> if a > 1 -> 1 } - │ ^ - -Expected type: - - Int - -Found type: - - Float - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_guard.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_guard.snap deleted file mode 100644 index 214410c3f..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_guard.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 49 -expression: "case <<1>> { <> if a == \"test\" -> 1 }" ---- -error: Type mismatch - ┌─ /src/one/two.gleam:1:39 - │ -1 │ case <<1>> { <> if a == "test" -> 1 } - │ ^^^^^^^^^^^ - -Expected type: - - UtfCodepoint - -Found type: - - String - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_invalid_type.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_invalid_type.snap deleted file mode 100644 index b1e660d40..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_invalid_type.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 7 -expression: "fn x() { \"test\" }\n\nfn main() {\n let a = <<1:size(x())>>\n a\n}" ---- -error: Type mismatch - ┌─ /src/one/two.gleam:4:22 - │ -4 │ let a = <<1:size(x())>> - │ ^^^ - -Expected type: - - Int - -Found type: - - String - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_size_not_int.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_size_not_int.snap deleted file mode 100644 index 425f1eece..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_size_not_int.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 179 -expression: "let x = <<1:size(\"1\")>> x" ---- -error: Type mismatch - ┌─ /src/one/two.gleam:1:18 - │ -1 │ let x = <<1:size("1")>> x - │ ^^^ - -Expected type: - - Int - -Found type: - - String - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_size_not_int_variable.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_size_not_int_variable.snap deleted file mode 100644 index e92909843..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__bit_string_size_not_int_variable.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 184 -expression: "let a = 2.0 case <<1>> { <<1:size(a)>> -> a }" ---- -error: Type mismatch - ┌─ /src/one/two.gleam:1:35 - │ -1 │ let a = 2.0 case <<1>> { <<1:size(a)>> -> a } - │ ^ - -Expected type: - - Int - -Found type: - - Float - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness1.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness1.snap deleted file mode 100644 index 8ea5fb7d3..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness1.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1490 -expression: "\npub fn main(b) {\n case b {\n True -> Nil\n }\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:3:5 - │ -3 │ ╭ case b { -4 │ │ True -> Nil -5 │ │ } - │ ╰─────^ - -This case expression does not match all possibilities. -Each constructor must have a pattern that matches it or -else it could crash. - -These values are not matched: - - - False - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness2.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness2.snap deleted file mode 100644 index c5ffad18f..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness2.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1503 -expression: "\npub fn main(r) {\n case r {\n Error(_) -> Nil\n }\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:3:5 - │ -3 │ ╭ case r { -4 │ │ Error(_) -> Nil -5 │ │ } - │ ╰─────^ - -This case expression does not match all possibilities. -Each constructor must have a pattern that matches it or -else it could crash. - -These values are not matched: - - - Ok - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness3.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness3.snap deleted file mode 100644 index 034179afc..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness3.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1516 -expression: "\npub type Media {\n Audio(BitArray)\n Video(BitArray)\n Text(String)\n}\npub fn main(m) {\n case m {\n Audio(_) as a -> a\n Video(_) -> m\n }\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:8:5 - │ - 8 │ ╭ case m { - 9 │ │ Audio(_) as a -> a -10 │ │ Video(_) -> m -11 │ │ } - │ ╰─────^ - -This case expression does not match all possibilities. -Each constructor must have a pattern that matches it or -else it could crash. - -These values are not matched: - - - Text - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness4.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness4.snap deleted file mode 100644 index 0866ba78e..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness4.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1535 -expression: "\npub type Media {\n Audio(BitArray)\n Video(BitArray)\n Text(String)\n}\npub fn main(m) {\n case m {\n Video(_) -> m\n }\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:8:5 - │ - 8 │ ╭ case m { - 9 │ │ Video(_) -> m -10 │ │ } - │ ╰─────^ - -This case expression does not match all possibilities. -Each constructor must have a pattern that matches it or -else it could crash. - -These values are not matched: - - - Audio - - Text - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness5.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness5.snap deleted file mode 100644 index b93759ef2..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness5.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1553 -expression: "\npub type Media {\n Audio(BitArray)\n Video(BitArray)\n Text(String)\n}\npub fn main(m) {\n case m {\n Audio(_) | Text(_) -> m\n }\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:8:5 - │ - 8 │ ╭ case m { - 9 │ │ Audio(_) | Text(_) -> m -10 │ │ } - │ ╰─────^ - -This case expression does not match all possibilities. -Each constructor must have a pattern that matches it or -else it could crash. - -These values are not matched: - - - Video - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness6.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness6.snap deleted file mode 100644 index c42abb909..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__case_exhaustiveness6.snap +++ /dev/null @@ -1,24 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1571 -expression: "\npub fn main(b) {\n case b {\n b if b == True -> Nil\n b if b != True -> Nil\n }\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:3:5 - │ -3 │ ╭ case b { -4 │ │ b if b == True -> Nil -5 │ │ b if b != True -> Nil -6 │ │ } - │ ╰─────^ - -This case expression does not match all possibilities. -Each constructor must have a pattern that matches it or -else it could crash. - -These values are not matched: - - - False - - True - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness1.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness1.snap deleted file mode 100644 index 640d98e4c..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness1.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1432 -expression: "\npub fn main(b) {\n let True = b\n Nil\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:3:5 - │ -3 │ let True = b - │ ^^^^^^^^^^^^ - -This assignment does not match all possibilities. -Either use a case expression with patterns for each possible -value, or use `let assert` rather than `let`. - -These values are not matched: - - - False - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness2.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness2.snap deleted file mode 100644 index f8eecf8c5..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness2.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1444 -expression: "\npub fn main(r) {\n let Error(_) = r\n Nil\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:3:5 - │ -3 │ let Error(_) = r - │ ^^^^^^^^^^^^^^^^ - -This assignment does not match all possibilities. -Either use a case expression with patterns for each possible -value, or use `let assert` rather than `let`. - -These values are not matched: - - - Ok - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness3.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness3.snap deleted file mode 100644 index cd3ad9a84..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness3.snap +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1456 -expression: "\npub type Media {\n Audio(BitArray)\n Video(BitArray)\n Text(String)\n}\npub fn main(m) {\n let Video(_) = m\n Nil\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:8:5 - │ -8 │ let Video(_) = m - │ ^^^^^^^^^^^^^^^^ - -This assignment does not match all possibilities. -Either use a case expression with patterns for each possible -value, or use `let assert` rather than `let`. - -These values are not matched: - - - Audio - - Text - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness4.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness4.snap deleted file mode 100644 index c42d8d1a8..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__errors__let_exhaustiveness4.snap +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: compiler-core/src/type_/tests/errors.rs -assertion_line: 1473 -expression: "\npub type Media {\n Audio(BitArray)\n Video(BitArray)\n Text(String)\n}\npub fn main(m) {\n let Video(_) as v = m\n v\n}\n" ---- -error: Not exhaustive pattern match - ┌─ /src/one/two.gleam:8:5 - │ -8 │ let Video(_) as v = m - │ ^^^^^^^^^^^^^^^^^^^^^ - -This assignment does not match all possibilities. -Either use a case expression with patterns for each possible -value, or use `let assert` rather than `let`. - -These values are not matched: - - - Audio - - Text - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_empty.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_empty.snap deleted file mode 100644 index afd25c771..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_empty.snap +++ /dev/null @@ -1,24 +0,0 @@ ---- -source: compiler-core/src/type_/tests/exhaustiveness.rs -assertion_line: 295 -expression: "\npub fn main(x) {\n case x {\n [] -> 1\n }\n}\n" ---- - -warning: Inexhaustive Patterns - ┌─ /src/warning/wrn.gleam:3:3 - │ -3 │ ╭ case x { -4 │ │ [] -> 1 -5 │ │ } - │ ╰───^ - -This case expression does not have a pattern for all possible values. -If is run on one of the values without a pattern then it will crash. - -The missing patterns are: - - [_, ..] - -In a future version of Gleam this will become a compile error. - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_non_empty.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_non_empty.snap deleted file mode 100644 index 5b8b26e7d..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_non_empty.snap +++ /dev/null @@ -1,24 +0,0 @@ ---- -source: compiler-core/src/type_/tests/exhaustiveness.rs -assertion_line: 308 -expression: "\npub fn main(x) {\n case x {\n [_, ..] -> 1\n }\n}\n" ---- - -warning: Inexhaustive Patterns - ┌─ /src/warning/wrn.gleam:3:3 - │ -3 │ ╭ case x { -4 │ │ [_, ..] -> 1 -5 │ │ } - │ ╰───^ - -This case expression does not have a pattern for all possible values. -If is run on one of the values without a pattern then it will crash. - -The missing patterns are: - - [] - -In a future version of Gleam this will become a compile error. - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_one.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_one.snap deleted file mode 100644 index 81cbdc8fd..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_one.snap +++ /dev/null @@ -1,25 +0,0 @@ ---- -source: compiler-core/src/type_/tests/exhaustiveness.rs -assertion_line: 321 -expression: "\npub fn main(x) {\n case x {\n [_] -> 1\n }\n}\n" ---- - -warning: Inexhaustive Patterns - ┌─ /src/warning/wrn.gleam:3:3 - │ -3 │ ╭ case x { -4 │ │ [_] -> 1 -5 │ │ } - │ ╰───^ - -This case expression does not have a pattern for all possible values. -If is run on one of the values without a pattern then it will crash. - -The missing patterns are: - - [] - [_, _, ..] - -In a future version of Gleam this will become a compile error. - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_one_two.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_one_two.snap deleted file mode 100644 index 9e44fab3d..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_one_two.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: compiler-core/src/type_/tests/exhaustiveness.rs -assertion_line: 334 -expression: "\npub fn main(x) {\n case x {\n [_] -> 1\n [_, _] -> 1\n }\n}\n" ---- - -warning: Inexhaustive Patterns - ┌─ /src/warning/wrn.gleam:3:3 - │ -3 │ ╭ case x { -4 │ │ [_] -> 1 -5 │ │ [_, _] -> 1 -6 │ │ } - │ ╰───^ - -This case expression does not have a pattern for all possible values. -If is run on one of the values without a pattern then it will crash. - -The missing patterns are: - - [] - [_, _, _, ..] - -In a future version of Gleam this will become a compile error. - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_zero_one_two.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_zero_one_two.snap deleted file mode 100644 index 333158113..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_zero_one_two.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: compiler-core/src/type_/tests/exhaustiveness.rs -assertion_line: 348 -expression: "\npub fn main(x) {\n case x {\n [] -> 1\n [_] -> 1\n [_, _] -> 1\n }\n}\n" ---- - -warning: Inexhaustive Patterns - ┌─ /src/warning/wrn.gleam:3:3 - │ -3 │ ╭ case x { -4 │ │ [] -> 1 -5 │ │ [_] -> 1 -6 │ │ [_, _] -> 1 -7 │ │ } - │ ╰───^ - -This case expression does not have a pattern for all possible values. -If is run on one of the values without a pattern then it will crash. - -The missing patterns are: - - [_, _, _, ..] - -In a future version of Gleam this will become a compile error. - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_zero_two_any.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_zero_two_any.snap deleted file mode 100644 index 58503a46c..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__exhaustiveness__result_list_zero_two_any.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: compiler-core/src/type_/tests/exhaustiveness.rs -assertion_line: 379 -expression: "\npub fn main(x) {\n case x {\n [] -> 1\n [_, _] -> 1\n [_, _, ..] -> 1\n }\n}\n" ---- - -warning: Inexhaustive Patterns - ┌─ /src/warning/wrn.gleam:3:3 - │ -3 │ ╭ case x { -4 │ │ [] -> 1 -5 │ │ [_, _] -> 1 -6 │ │ [_, _, ..] -> 1 -7 │ │ } - │ ╰───^ - -This case expression does not have a pattern for all possible values. -If is run on one of the values without a pattern then it will crash. - -The missing patterns are: - - [_] - -In a future version of Gleam this will become a compile error. - - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__expression__function_with_no_valid_implementations.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__expression__function_with_no_valid_implementations.snap deleted file mode 100644 index c5a42ec93..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__expression__function_with_no_valid_implementations.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: compiler-core/src/type_/tests/expression.rs -expression: "\n@external(javascript, \"foo\", \"bar\")\npub fn javascript_only() -> Int\n \n@external(erlang, \"foo\", \"bar\")\npub fn erlang_only() -> Int\n\npub fn main() {\n javascript_only()\n erlang_only()\n}\n" ---- -error: Unsupported target - ┌─ /src/one/two.gleam:9:5 - │ -9 │ javascript_only() - │ ^^^^^^^^^^^^^^^ - -This value is not available as it is defined using externals, and there is -no implementation for the Erlang target. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__functions__unused_function_body.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__functions__unused_function_body.snap deleted file mode 100644 index 15d6ef430..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__functions__unused_function_body.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: compiler-core/src/type_/tests/functions.rs -assertion_line: 175 -expression: "\n@external(javascript, \"foo\", \"bar\")\n@external(erlang, \"foo\", \"bar\")\npub fn foo() -> Int {\n // This is dead code since there already is an\n // external implementation for all targets.\n 11\n}" ---- - -warning: Unused function body - ┌─ /src/warning/wrn.gleam:4:1 - │ -4 │ pub fn foo() -> Int { - │ ^^^^^^^^^^^^^^^^^^^ - -This function has external implementations for all targets so the body is -never used. - -Hint: The body can be safely removed - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__unqualified_using_opaque_constructo.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__unqualified_using_opaque_constructo.snap deleted file mode 100644 index 6d01638c0..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__unqualified_using_opaque_constructo.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: compiler-core/src/type_/tests/imports.rs -expression: "import one.{Two}\n\npub fn main() {\n Two\n}" ---- ------ SOURCE CODE --- one.gleam -pub opaque type Two { Two } - --- main.gleam -import one.{Two} - -pub fn main() { - Two -} - ------ ERROR -error: Unknown module value - ┌─ /src/one/two.gleam:1:13 - │ -1 │ import one.{Two} - │ ^^^ Did you mean `type Two`? - -`Two` is only a type, it cannot be imported as a value. - -error: Unknown variable - ┌─ /src/one/two.gleam:4:3 - │ -4 │ Two - │ ^^^ - -The name `Two` is not in scope here. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__unqualified_using_private_constructo.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__unqualified_using_private_constructo.snap deleted file mode 100644 index fa91dbca4..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__unqualified_using_private_constructo.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: compiler-core/src/type_/tests/imports.rs -expression: "import one.{Two}\n\npub fn main() {\n Two\n}" ---- ------ SOURCE CODE --- one.gleam -type Two { Two } - --- main.gleam -import one.{Two} - -pub fn main() { - Two -} - ------ ERROR -error: Unknown module value - ┌─ /src/one/two.gleam:1:13 - │ -1 │ import one.{Two} - │ ^^^ - -The module `one` does not have a `Two` value. - -error: Unknown variable - ┌─ /src/one/two.gleam:4:3 - │ -4 │ Two - │ ^^^ - -The name `Two` is not in scope here. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__using_opaque_constructo.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__using_opaque_constructo.snap deleted file mode 100644 index f61a0ab05..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__using_opaque_constructo.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: compiler-core/src/type_/tests/imports.rs -expression: "import one\n\npub fn main() {\n one.Two\n}" ---- ------ SOURCE CODE --- one.gleam -pub opaque type Two { Two } - --- main.gleam -import one - -pub fn main() { - one.Two -} - ------ ERROR -error: Unknown module value - ┌─ /src/one/two.gleam:4:6 - │ -4 │ one.Two - │ ^^^^ - -The module `one` does not have a `Two` value. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__using_private_constructo.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__using_private_constructo.snap deleted file mode 100644 index 29f0998b8..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__imports__using_private_constructo.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: compiler-core/src/type_/tests/imports.rs -expression: "import one\n\npub fn main() {\n one.Two\n}" ---- ------ SOURCE CODE --- one.gleam -type Two { Two } - --- main.gleam -import one - -pub fn main() { - one.Two -} - ------ ERROR -error: Unknown module value - ┌─ /src/one/two.gleam:4:6 - │ -4 │ one.Two - │ ^^^^ - -The module `one` does not have a `Two` value. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecate_type_import_extenal.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecate_type_import_extenal.snap deleted file mode 100644 index 63bdbd80e..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecate_type_import_extenal.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -assertion_line: 1013 -expression: "\nimport module.{X}\npub type Y = X\n" ---- - -warning: Deprecated type import - ┌─ /src/warning/wrn.gleam:2:16 - │ -2 │ import module.{X} - │ ^ - -The syntax for importing a type has changed. The new syntax is: - - import module.{type X} - -Hint: Run `gleam fix` to auto-fix your code. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecate_type_import_type_alias.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecate_type_import_type_alias.snap deleted file mode 100644 index ac6f48e24..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecate_type_import_type_alias.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -assertion_line: 1024 -expression: "\nimport module.{X}\npub type Y = X\n" ---- - -warning: Deprecated type import - ┌─ /src/warning/wrn.gleam:2:16 - │ -2 │ import module.{X} - │ ^ - -The syntax for importing a type has changed. The new syntax is: - - import module.{type X} - -Hint: Run `gleam fix` to auto-fix your code. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecate_type_import_type_custom_type.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecate_type_import_type_custom_type.snap deleted file mode 100644 index bbbf617df..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecate_type_import_type_custom_type.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -assertion_line: 1035 -expression: "\nimport module.{X}\npub type Y = X\n" ---- - -warning: Deprecated type import - ┌─ /src/warning/wrn.gleam:2:16 - │ -2 │ import module.{X} - │ ^ - -The syntax for importing a type has changed. The new syntax is: - - import module.{type X} - -Hint: Run `gleam fix` to auto-fix your code. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_array_type.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_array_type.snap deleted file mode 100644 index ec98baa65..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_array_type.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -assertion_line: 883 -expression: pub type B = BitString ---- - -warning: Deprecated BitString name used - ┌─ /src/warning/wrn.gleam:1:14 - │ -1 │ pub type B = BitString - │ ^^^^^^^^^ - -The type BitString has been renamed to BitArray. - -Hint: Run `gleam fix` to auto-fix your code. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_array_type_aliased.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_array_type_aliased.snap deleted file mode 100644 index fddb08cc9..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_array_type_aliased.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -assertion_line: 934 -expression: "\nimport gleam.{type BitString as BibbleWib}\npub type B = BibbleWib\n" ---- - -warning: Deprecated BitString name used - ┌─ /src/warning/wrn.gleam:2:15 - │ -2 │ import gleam.{type BitString as BibbleWib} - │ ^^^^^^^^^^^^^^ - -The type BitString has been renamed to BitArray. - -Hint: Run `gleam fix` to auto-fix your code. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_array_type_imported.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_array_type_imported.snap deleted file mode 100644 index 9651d472b..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_array_type_imported.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -assertion_line: 888 -expression: "\nimport gleam\npub type B = gleam.BitString\n" ---- - -warning: Deprecated BitString name used - ┌─ /src/warning/wrn.gleam:3:14 - │ -3 │ pub type B = gleam.BitString - │ ^^^^^^^^^^^^^^^ - -The type BitString has been renamed to BitArray. - -Hint: Run `gleam fix` to auto-fix your code. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_string_type.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_string_type.snap deleted file mode 100644 index ec98baa65..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_string_type.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -assertion_line: 883 -expression: pub type B = BitString ---- - -warning: Deprecated BitString name used - ┌─ /src/warning/wrn.gleam:1:14 - │ -1 │ pub type B = BitString - │ ^^^^^^^^^ - -The type BitString has been renamed to BitArray. - -Hint: Run `gleam fix` to auto-fix your code. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_string_type_aliased.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_string_type_aliased.snap deleted file mode 100644 index 1ff554df5..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_string_type_aliased.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -assertion_line: 898 -expression: "\nimport gleam.{BitString as BibbleWib}\npub type B = BibbleWib\n" ---- - -warning: Deprecated BitString name used - ┌─ /src/warning/wrn.gleam:2:15 - │ -2 │ import gleam.{BitString as BibbleWib} - │ ^^^^^^^^^ - -The type BitString has been renamed to BitArray. - -Hint: Run `gleam fix` to auto-fix your code. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_string_type_imported.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_string_type_imported.snap deleted file mode 100644 index 9651d472b..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__deprecated_bit_string_type_imported.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -assertion_line: 888 -expression: "\nimport gleam\npub type B = gleam.BitString\n" ---- - -warning: Deprecated BitString name used - ┌─ /src/warning/wrn.gleam:3:14 - │ -3 │ pub type B = gleam.BitString - │ ^^^^^^^^^^^^^^^ - -The type BitString has been renamed to BitArray. - -Hint: Run `gleam fix` to auto-fix your code. - diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__internal_type_in_public_constructor.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__internal_type_in_public_constructor.snap deleted file mode 100644 index 212741991..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__internal_type_in_public_constructor.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -expression: "\n@internal\npub type Wibble {\n Wibble\n}\n\npub type Wobble {\n Wobble(Wibble)\n}\n" ---- -warning: Internal type used in public interface - ┌─ /src/warning/wrn.gleam:8:5 - │ -8 │ Wobble(Wibble) - │ ^^^^^^^^^^^^^^ - -The following type is internal, but is being used by this public export. - - Wibble - -Internal types should not be used in a public facing function since they are -hidden from the package's documentation. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__internal_type_in_public_function_argument.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__internal_type_in_public_function_argument.snap deleted file mode 100644 index 8994aaf5a..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__internal_type_in_public_function_argument.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -expression: "\n@internal\npub type Wibble {\n Wibble\n}\n\npub fn wibble(_wibble: Wibble) -> Int { 1 }\n" ---- -warning: Internal type used in public interface - ┌─ /src/warning/wrn.gleam:7:1 - │ -7 │ pub fn wibble(_wibble: Wibble) -> Int { 1 } - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The following type is internal, but is being used by this public export. - - Wibble - -Internal types should not be used in a public facing function since they are -hidden from the package's documentation. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__internal_type_in_public_function_return.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__internal_type_in_public_function_return.snap deleted file mode 100644 index fa9527eed..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__internal_type_in_public_function_return.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -expression: "\n@internal\npub type Wibble {\n Wibble\n}\n\npub fn wibble() -> Wibble { Wibble }\n" ---- -warning: Internal type used in public interface - ┌─ /src/warning/wrn.gleam:7:1 - │ -7 │ pub fn wibble() -> Wibble { Wibble } - │ ^^^^^^^^^^^^^^^^^^^^^^^^^ - -The following type is internal, but is being used by this public export. - - Wibble - -Internal types should not be used in a public facing function since they are -hidden from the package's documentation. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_dependency_in_public_constructor.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_dependency_in_public_constructor.snap deleted file mode 100644 index 40c867da0..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_dependency_in_public_constructor.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -expression: "\nimport dep/internal.{type Wibble}\n\npub type Wobble {\n Wobble(Wibble)\n}" ---- -warning: Internal type used in public interface - ┌─ /src/warning/wrn.gleam:5:3 - │ -5 │ Wobble(Wibble) - │ ^^^^^^^^^^^^^^ - -The following type is internal, but is being used by this public export. - - Wibble - -Internal types should not be used in a public facing function since they are -hidden from the package's documentation. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_in_public_constructor.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_in_public_constructor.snap deleted file mode 100644 index 0a0de8ce7..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_in_public_constructor.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -expression: "\nimport thepackage/internal.{type Wibble}\n\npub type Wobble {\n Wobble(Wibble)\n}" ---- -warning: Internal type used in public interface - ┌─ /src/warning/wrn.gleam:5:3 - │ -5 │ Wobble(Wibble) - │ ^^^^^^^^^^^^^^ - -The following type is internal, but is being used by this public export. - - Wibble - -Internal types should not be used in a public facing function since they are -hidden from the package's documentation. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_in_public_function_argument.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_in_public_function_argument.snap deleted file mode 100644 index d79a3c0b4..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_in_public_function_argument.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -expression: "\nimport thepackage/internal.{type Wibble}\n\npub fn wibble(_wibble: Wibble) -> Int {\n 1\n}\n" ---- -warning: Internal type used in public interface - ┌─ /src/warning/wrn.gleam:4:1 - │ -4 │ pub fn wibble(_wibble: Wibble) -> Int { - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The following type is internal, but is being used by this public export. - - Wibble - -Internal types should not be used in a public facing function since they are -hidden from the package's documentation. diff --git a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_in_public_function_return.snap b/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_in_public_function_return.snap deleted file mode 100644 index c72b66058..000000000 --- a/compiler-core/src/type_/tests/snapshots/glistix_core__type___tests__warnings__type_from_internal_module_in_public_function_return.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: compiler-core/src/type_/tests/warnings.rs -expression: "\nimport thepackage/internal.{type Wibble, Wibble}\n\npub fn wibble() -> Wibble {\n Wibble\n}" ---- -warning: Internal type used in public interface - ┌─ /src/warning/wrn.gleam:4:1 - │ -4 │ pub fn wibble() -> Wibble { - │ ^^^^^^^^^^^^^^^^^^^^^^^^^ - -The following type is internal, but is being used by this public export. - - Wibble - -Internal types should not be used in a public facing function since they are -hidden from the package's documentation.