File tree Expand file tree Collapse file tree
crates/cairo-lang-semantic/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,12 +120,12 @@ error[E2182]: Closures are not allowed in this context.
120120|_^
121121
122122error[E2302]: Type mismatch: `{closure@lib.cairo:1:17: 1:19}` and `core::integer::i32`.
123- --> lib.cairo:1:1 -4:2
123+ --> lib.cairo:1:17 -4:1
124124 const _x: i32 = || {
125- _ ^
125+ _________________ ^
126126| ...
127127| };
128- |__ ^
128+ |_ ^
129129
130130//! > ==========================================================================
131131
Original file line number Diff line number Diff line change @@ -248,9 +248,9 @@ error[E2125]: The '?' operator is not supported outside of functions.
248248 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
249249
250250error[E2315]: Mismatched types. The type `core::bool` cannot be created from a numeric literal.
251- --> lib.cairo:6:1
251+ --> lib.cairo:6:42
252252const WRONG_TYPE_AND_NOT_LITERAL: bool = 1 + 2;
253- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^
253+ ^^^^^
254254
255255error[E2127]: This expression is not supported as constant.
256256 --> lib.cairo:14:47
@@ -308,9 +308,9 @@ const DEFAULT_VAR: bool = 1;
308308
309309//! > expected_diagnostics
310310error[E2315]: Mismatched types. The type `core::bool` cannot be created from a numeric literal.
311- --> lib.cairo:1:1
311+ --> lib.cairo:1:27
312312const DEFAULT_VAR: bool = 1;
313- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^
313+ ^
314314
315315//! > ==========================================================================
316316
Original file line number Diff line number Diff line change @@ -464,7 +464,7 @@ pub fn resolve_const_expr_and_evaluate<'db, 'mt>(
464464 let mut_ref = & mut ctx. resolver ;
465465 let mut inference: crate :: expr:: inference:: Inference < ' db , ' _ > = mut_ref. inference ( ) ;
466466 if let Err ( err_set) = inference. conform_ty ( value. ty ( ) , target_type) {
467- inference. report_on_pending_error ( err_set, ctx. diagnostics , const_stable_ptr ) ;
467+ inference. report_on_pending_error ( err_set, ctx. diagnostics , value . stable_ptr ( ) . untyped ( ) ) ;
468468 }
469469
470470 if finalize {
Original file line number Diff line number Diff line change @@ -645,9 +645,9 @@ impl MyImpl of MyTrait {
645645
646646//! > expected_diagnostics
647647error[E2302]: Type mismatch: `core::integer::u32` and `core::integer::u16`.
648- --> lib.cairo:6:5
648+ --> lib.cairo:6:20
649649 const X: u16 = Self::Y;
650- ^^^^^^^^^^^^^^^^ ^^^^^^^
650+ ^^^^^^^
651651
652652//! > ==========================================================================
653653
You can’t perform that action at this time.
0 commit comments