Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
30dde09
super_errors: cover typecore Label_not_mutable, Apply_non_function, I…
JonoPrest May 19, 2026
06505b0
super_errors: cover typedecl Boxed_and_unboxed, Bad_unboxed_attribute…
JonoPrest May 19, 2026
d428a01
super_errors: cover translcore Unknown_builtin_primitive and typecore…
JonoPrest May 19, 2026
bb417af
super_errors: cover typemod With_no_component, Cannot_apply, Recursiv…
JonoPrest May 19, 2026
efd21b7
super_errors: cover translmod Fragile_pattern_in_toplevel and transl_…
JonoPrest May 19, 2026
46b9a97
super_errors: cover includemod signature-mismatch errors (Missing_fie…
JonoPrest May 19, 2026
92af7ba
super_errors: cover typecore Not_an_extension_constructor, Invalid_ex…
JonoPrest May 19, 2026
8883005
super_errors: cover rec_check Illegal_letrec_expr
JonoPrest May 19, 2026
fb56091
super_errors: cover typedecl Nonrec_gadt, Not_extensible_type, Cannot…
JonoPrest May 19, 2026
66253ff
super_errors: cover typedecl Object_spread_with_record_field
JonoPrest May 19, 2026
36d1234
super_errors: cover typetexp Unbound_value, Unbound_constructor, Unbo…
JonoPrest May 19, 2026
a0fc988
super_errors: cover let-module scope escape, typemod Apply_generative…
JonoPrest May 19, 2026
a3d619d
super_errors: cover bs_syntaxerr Invalid_bs_int_type, Invalid_bs_stri…
JonoPrest May 19, 2026
014aa81
super_errors: cover bs_syntaxerr Conflict_attributes
JonoPrest May 19, 2026
f005778
super_errors: cover bs_syntaxerr Expect_string/int_literal and includ…
JonoPrest May 19, 2026
729a9a2
super_errors: cover includemod Modtype_infos and typedecl Unbound_typ…
JonoPrest May 19, 2026
2c247ec
super_errors: cover typetexp Method_mismatch and typedecl Bad_immedia…
JonoPrest May 19, 2026
7064605
super_errors: cover typetexp Multiple_constraints_on_type
JonoPrest May 19, 2026
7ccb84e
super_errors: cover typetexp Access_functor_as_structure, Constructor…
JonoPrest May 19, 2026
c7e5309
super_errors: cover typemod Structure_expected via opening a functor
JonoPrest May 19, 2026
45be027
super_errors: cover typecore Constructor_arity_mismatch and Private_t…
JonoPrest May 19, 2026
64696e3
super_errors: cover typemod Not_a_packed_module, typecore Cannot_infe…
JonoPrest May 19, 2026
3504be6
super_errors: cover typedecl Bad_unboxed_attribute many-fields and ex…
JonoPrest May 19, 2026
619a408
super_errors: cover typedecl Bad_variance contravariant case
JonoPrest May 19, 2026
1db2ee9
super_errors: cover typetexp Not_an_object and Opened_object via obje…
JonoPrest May 19, 2026
13ade3b
super_errors: cover typedecl Definition_mismatch and typecore Constru…
JonoPrest May 19, 2026
f6f3973
super_errors: cover typedecl Invalid_attribute for @notUndefined on n…
JonoPrest May 19, 2026
3de9e9f
super_errors: cover typedecl Variant_spread_fail when source isn't a …
JonoPrest May 19, 2026
beb5c71
super_errors: cover bs_syntaxerr Not_supported_directive_in_bs_return…
JonoPrest May 19, 2026
bb03634
super_errors: cover typecore Undefined_method via object field access
JonoPrest May 19, 2026
5f96c00
super_errors: cover includemod Modtype_permutation
JonoPrest May 19, 2026
75f37a5
super_errors: cover typemod Not_allowed_in_functor_body, Incomplete_p…
JonoPrest May 19, 2026
edcd7c1
super_errors: cover typetexp Alias_type_mismatch
JonoPrest May 19, 2026
655251a
Update changelog for #8432
JonoPrest May 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- Remove `Primitive_option.toUndefined`; use `valFromOption` for optional ffi args. https://github.com/rescript-lang/rescript/pull/8380
- Expand `super_errors` fixture coverage for warnings and errors. https://github.com/rescript-lang/rescript/pull/8429
- Run `super_errors` fixtures in parallel (~2.4× faster locally). https://github.com/rescript-lang/rescript/pull/8430
- Expand `super_errors` fixture coverage for the remaining reachable single-file error variants. https://github.com/rescript-lang/rescript/pull/8432


# 13.0.0-alpha.4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/access_functor_as_structure.res:9:8-10

7 │ }
8 │
9 │ let _: F.v = 1
10 │

The module F is a functor, not a structure
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

We've found a bug for you!
/.../fixtures/apply_generative.res:5:12

3 │ }
4 │
5 │ module M = F({
6 │ let y = 2
7 │ })

This is a generative functor. It can only be applied to ()
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

We've found a bug for you!
/.../fixtures/apply_non_function.res:3:9

1 │ let x = 1
2 │
3 │ let y = x(2)
4 │

This can't be called, it's not a function.
The function has type: int
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/bad_immediate_attribute.res:2:1-15

1 │ @immediate
2 │ type t = string
3 │

Types marked with the immediate attribute must be
non-pointer types like int or bool
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

We've found a bug for you!
/.../fixtures/bad_unboxed_attribute_abstract.res:1:10-15

1 │ @unboxed type t
2 │

This type cannot be unboxed because it is abstract.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/bad_unboxed_attribute_extensible.res:2:1-11

1 │ @unboxed
2 │ type t = ..
3 │

This type cannot be unboxed because
extensible variant types cannot be unboxed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/bad_unboxed_attribute_many_fields.res:2:1-25

1 │ @unboxed
2 │ type t = {a: int, b: int}
3 │

This type cannot be unboxed because it has more than one field.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

We've found a bug for you!
/.../fixtures/bad_unboxed_attribute_mutable.res:1:10-38

1 │ @unboxed type t = {mutable value: int}
2 │

This type cannot be unboxed because it is mutable.
10 changes: 10 additions & 0 deletions tests/build_tests/super_errors/expected/bad_variance.res.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/bad_variance.res:1:1-24

1 │ type t<+'a> = 'a => unit
2 │

In this definition, expected parameter variances are not satisfied.
The 1st type parameter was expected to be covariant,
but it is injective contravariant.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/bad_variance_contra.res:1:1-16

1 │ type t<-'a> = 'a
2 │

In this definition, expected parameter variances are not satisfied.
The 1st type parameter was expected to be contravariant,
but it is injective covariant.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/boxed_and_unboxed.res:2:1-17

1 │ @unboxed @boxed
2 │ type t = One(int)
3 │

A type cannot be boxed and unboxed at the same time.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/bs_conflict_attributes.res:1:21-24

1 │ external f: @string @int [#A | #B] => unit = "f"
2 │
3 │ let _ = f(#A)

conflicting attributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/bs_expect_int_literal.res:1:19-21

1 │ external f: @int [@as("hello") #A | #B] => unit = "f"
2 │
3 │ let _ = f(#A)

expect int literal
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

We've found a bug for you!
/.../fixtures/bs_expect_opt_in_bs_return_to_opt.res:1:1-2:31

1 │ @return(null_to_opt)
2 │ external f: string => int = "f"
3 │
4 │ let _ = f("x")

%@return directive *_to_opt expect return type to be
syntax wise `_ option` for safety
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/bs_expect_string_literal.res:1:22-24

1 │ external f: @string [@as(1) #A | #B] => unit = "f"
2 │
3 │ let _ = f(#A)

expect string literal
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/bs_illegal_attribute_scope.res:1:1-6

1 │ @scope @val
2 │ external x: int = "x"
3 │

Illegal attributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/bs_invalid_bs_int_type.res:1:18-25

1 │ external f: @int [#A(int)] => unit = "f"
2 │
3 │ let _ = f(#A(1))

Not a valid type for %@int
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/bs_invalid_bs_string_type.res:1:21-33

1 │ external f: @string [#A | #B(int)] => unit = "f"
2 │
3 │ let _ = f(#A)

Not a valid type for %@string
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/bs_invalid_bs_unwrap_type.res:1:21-23

1 │ external f: @unwrap int => unit = "f"
2 │
3 │ let _ = f(1)

Not a valid type for %@unwrap. Type must be an inline variant (closed), and
each constructor must have an argument.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/bs_not_supported_directive_in_bs_return.res:1:1-7

1 │ @return(bogus)
2 │ external f: string => int = "f"
3 │

Not supported return directive
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

We've found a bug for you!
/.../fixtures/cannot_apply_non_functor.res:5:12

3 │ }
4 │
5 │ module N = M()
6 │

This module is not a functor; it has type {
let x: int
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/cannot_extend_private_type.res:7:13

5 │ }
6 │
7 │ type M.t += C
8 │

Cannot extend private type definition M.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/cannot_infer_signature.res:2:14-22

1 │ let extract = m => {
2 │ module M = unpack(m)
3 │ M
4 │ }

The signature for this packaged module couldn't be inferred.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/constraint_failed.res:3:14-19

1 │ type t<'a> = 'a constraint 'a = int
2 │
3 │ type bad = t<string>
4 │

This type string should be an instance of type int
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

We've found a bug for you!
/.../fixtures/constructor_arity_mismatch.res:5:9-15

3 │ | Single(string)
4 │
5 │ let x = Pair(1)
6 │
7 │ let y = Single(1, 2)

This variant constructor Pair expects 2 arguments, but it's only being passed 1.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

We've found a bug for you!
/.../fixtures/constructor_arity_mismatch_pattern.res:5:5-11

3 │ let f = x =>
4 │ switch x {
5 │ | Pair(a) => a
6 │ }
7 │

This variant constructor Pair expects 2 arguments, but it's only being passed 1.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

We've found a bug for you!
/.../fixtures/definition_mismatch.res:1:1-26

1 │ type t = list<int> = Empty
2 │

This variant or record definition does not match that of type list<int>
They have different arities.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

We've found a bug for you!
/.../fixtures/field_access_on_dict_type.res:3:11

1 │ let d: dict<int> = dict{"a": 1}
2 │
3 │ let v = d.a
4 │

Direct field access on a dict is not supported. Use Dict.get instead.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Warning number 8
/.../fixtures/fragile_pattern_toplevel.res:1:5-11

1 │ let Some(x) = Some(1)
2 │
3 │ let _ = x

You forgot to handle a possible case here, for example:
| None


We've found a bug for you!
/.../fixtures/fragile_pattern_toplevel.res:1:5-11

1 │ let Some(x) = Some(1)
2 │
3 │ let _ = x

Such fragile pattern not allowed in the toplevel
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

We've found a bug for you!
/.../fixtures/illegal_letrec_expr.res:1:13-17

1 │ let rec x = x + 1
2 │

This kind of expression is not allowed as right-hand side of `let rec'
Loading
Loading