···11---
22source: compiler-core/src/parse/tests.rs
33-expression: "\n@external(erlang, \"module\", \"fun\")\npub type Fun\n"
33+expression: "\n@external(erlang, \"module\", \"fun\")\npub type Fun = Fun\n"
44---
55----- SOURCE CODE
6677@external(erlang, "module", "fun")
88-pub type Fun
88+pub type Fun = Fun
9910101111----- ERROR
···11+---
22+source: compiler-core/src/type_/tests/errors.rs
33+expression: "\n@external(erlang, \"gleam_stdlib\", \"dict\")\npub type Dict(key, value) {\n Dict(pairs: List(#(key, value)))\n}\n"
44+---
55+----- SOURCE CODE
66+77+@external(erlang, "gleam_stdlib", "dict")
88+pub type Dict(key, value) {
99+ Dict(pairs: List(#(key, value)))
1010+}
1111+1212+1313+----- ERROR
1414+error: External type with constructors
1515+ ┌─ /src/one/two.gleam:3:1
1616+ │
1717+3 │ pub type Dict(key, value) {
1818+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^
1919+2020+This type is annotated with the `@external` annotation, but it has
2121+constructors. The `@external` annotation is only for external types with no
2222+constructors.
2323+Hint: Remove the `@external` annotation
···11+---
22+source: compiler-core/src/type_/tests/warnings.rs
33+expression: "\n@external(erlang, \"wibble\", \"wobble\")\npub type Wobble\n"
44+---
55+----- SOURCE CODE
66+77+@external(erlang, "wibble", "wobble")
88+pub type Wobble
99+1010+1111+----- WARNING
1212+warning: Incompatible gleam version range
1313+ ┌─ /src/warning/wrn.gleam:3:1
1414+ │
1515+3 │ pub type Wobble
1616+ │ ^^^^^^^^^^^^^^^ This requires a Gleam version >= 1.14.0
1717+1818+The `@external` annotation on custom types was introduced in version
1919+v1.14.0. But the Gleam version range specified in your `gleam.toml` would
2020+allow this code to run on an earlier version like v1.0.0, resulting in
2121+compilation errors!
2222+Hint: Remove the version constraint from your `gleam.toml` or update it to be:
2323+2424+ gleam = ">= 1.14.0"