poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 7/9] pkl: add location info to synthesized assignment stmts


From: Mohammad-Reza Nabipoor
Subject: Re: [PATCH 7/9] pkl: add location info to synthesized assignment stmts
Date: Thu, 28 Dec 2023 16:29:34 +0100

On Thu, Dec 28, 2023 at 03:23:10PM +0100, Jose E. Marchesi wrote:
> 
> Hmm, how accurate are these locations?
> Can you please add a couple of tests to make sure the locations make
> sense?
> 

These locations are necessary for the "pkl: report evaluation location in 
E_constraint exception"
patch.

Example:

(poke) type A =  struct { int i == 1; }
(poke) var a = A {}
(poke) a.i++
unhandled constraint violation exception
failed expression
  i == 1
in field A.i evaluated at <stdin>:1:1 (defined at <stdin>:1:24)
  

Reason: In the codegen, we need the location of the synthesized assignment to 
report it to the user.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]