Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

misuse of strlit not caught #74

Closed
nano-o opened this issue Jun 6, 2020 · 2 comments
Closed

misuse of strlit not caught #74

nano-o opened this issue Jun 6, 2020 · 2 comments

Comments

@nano-o
Copy link

nano-o commented Jun 6, 2020

Hello, the generated code for impl crashes at runtime with the following error, although ivy_check does not complain.

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
#lang ivy1.7

type t
interpret t -> strlit
individual x:t
action my_action(x:t) = {
}
after init {
    call my_action(0);
}

extract impl = this
@kenmcmil
Copy link
Contributor

kenmcmil commented Jun 8, 2020

Fixed in commit 4d97c7e. Now outputs this:

error: Cannot compile numeral 0:t of string sort t

Thanks.

@kenmcmil kenmcmil closed this as completed Jun 8, 2020
kenmcmil added a commit that referenced this issue Jun 8, 2020
@kenmcmil
Copy link
Contributor

kenmcmil commented Jun 8, 2020

Oops. Pushed fix for the fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants