pyret-lang icon indicating copy to clipboard operation
pyret-lang copied to clipboard

Newtype results in internal errors/`Key atom#T#nn` not found

Open molenzwiebel opened this issue 4 years ago • 1 comments

Running the following script yields an internal error without type checking, or the error Key atom#NumberT#72 not found when type checking is enabled:

newtype NumberA as NumberT

a = NumberT.brand("a")

molenzwiebel avatar Jun 01 '21 18:06 molenzwiebel

Thanks, that needs a better error message. The intent of brand() is that it can only be applied to objects, not to primitive values, so that should be a specific dynamic error.

On Tue, Jun 01, 2021 at 11:24 AM, Thijs Molendijk @.***> wrote:

Running the following script yields an internal error without type checking, or the error Key atom#NumberT#72 not found when type checking is enabled:

newtype NumberA as NumberT

a = NumberT.brand("a")

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brownplt/pyret-lang/issues/1591, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5IU5WAOVSMRQ67FQDQ3LTQUQXLANCNFSM455FVOUQ .

jpolitz avatar Jun 01 '21 21:06 jpolitz