Skip to content

Commit

Permalink
Update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Nov 7, 2024
1 parent 582b9aa commit 84845bb
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
---
source: compiler-core/src/parse/tests.rs
assertion_line: 1577
assertion_line: 1605
expression: "\ntype Wibble {\n @external(erlang, \"one\", \"two\")\n Wibble1\n}\n"
---
----- SOURCE CODE

type Wibble {
@external(erlang, "one", "two")
Wibble1
}


----- ERROR
error: Syntax error
┌─ /src/parse/error.gleam:3:5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
---
source: compiler-core/src/parse/tests.rs
assertion_line: 1565
assertion_line: 1593
expression: "\ntype Wibble {\n @internal\n Wibble1\n}\n"
---
----- SOURCE CODE

type Wibble {
@internal
Wibble1
}


----- ERROR
error: Syntax error
┌─ /src/parse/error.gleam:3:5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
---
source: compiler-core/src/parse/tests.rs
assertion_line: 1539
assertion_line: 1567
expression: "\ntype Wibble {\n @deprecated(\"1\")\n @deprecated(\"2\")\n Wibble1\n Wibble2\n}\n"
---
----- SOURCE CODE

type Wibble {
@deprecated("1")
@deprecated("2")
Wibble1
Wibble2
}


----- ERROR
error: Syntax error
┌─ /src/parse/error.gleam:4:5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
---
source: compiler-core/src/parse/tests.rs
assertion_line: 1589
assertion_line: 1617
expression: "\ntype Wibble {\n @external(erlang, \"one\", \"two\")\n @target(erlang)\n @internal\n Wibble1\n}\n"
---
----- SOURCE CODE

type Wibble {
@external(erlang, "one", "two")
@target(erlang)
@internal
Wibble1
}


----- ERROR
error: Syntax error
┌─ /src/parse/error.gleam:3:5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
---
source: compiler-core/src/parse/tests.rs
assertion_line: 1553
assertion_line: 1581
expression: "\ntype Wibble {\n @target(erlang)\n Wibble2\n}\n"
---
----- SOURCE CODE

type Wibble {
@target(erlang)
Wibble2
}


----- ERROR
error: Syntax error
┌─ /src/parse/error.gleam:3:5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ source: compiler-core/src/type_/tests/custom_types.rs
assertion_line: 68
expression: "\n@deprecated(\"2\")\npub type Numbers {\n @deprecated(\"1\")\n One\n Two\n}\n\npub fn num() {\n let _two = Two\n Nil\n}\n"
---
----- SOURCE CODE

@deprecated("2")
pub type Numbers {
@deprecated("1")
One
Two
}

pub fn num() {
let _two = Two
Nil
}


----- ERROR
error: Deprecating variants of a type that is deprecated is not allowed
┌─ /src/one/two.gleam:5:3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ source: compiler-core/src/type_/tests/custom_types.rs
assertion_line: 35
expression: "\npub type Numbers {\n @deprecated(\"1\")\n One\n @deprecated(\"2\")\n Two\n}\n"
---
----- SOURCE CODE

pub type Numbers {
@deprecated("1")
One
@deprecated("2")
Two
}


----- ERROR
error: Deprecating all variants of a type is not allowed.
┌─ /src/one/two.gleam:2:1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ source: compiler-core/src/type_/tests/custom_types.rs
assertion_line: 49
expression: "\npub type Numbers {\n @deprecated(\"1\")\n One\n Two\n}\n\npub fn num() {\n let _one = One\n let _two = Two\n Nil\n}\n"
---
----- SOURCE CODE

pub type Numbers {
@deprecated("1")
One
Two
}

pub fn num() {
let _one = One
let _two = Two
Nil
}


----- WARNING
warning: Deprecated value used
┌─ /src/warning/wrn.gleam:9:14
Expand Down

0 comments on commit 84845bb

Please sign in to comment.