Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependencies when using bigSubstring #1542

Open
LioTree opened this issue Jul 19, 2024 · 1 comment
Open

Missing dependencies when using bigSubstring #1542

LioTree opened this issue Jul 19, 2024 · 1 comment
Assignees

Comments

@LioTree
Copy link

LioTree commented Jul 19, 2024

import stainless.lang.*

def test1(): String = {
    val a = "hello"
    a.bigSubstring(1, 3)
}

def test2(): String = {
    val a = "hello"
    a.bigSubstring(1)
}
[  Info  ] Finished compiling                                       
[  Info  ] Preprocessing the symbols...                             
[ Error  ] substring.scala:3:5: test1 depends on missing dependencies:
           def test1(): String = {
               ^
[ Error  ] Method bigSubstring
[ Error  ] substring.scala:5:5: 
               a.bigSubstring(1, 3)
               ^^^^^^^^^^^^^^^^^^^^
[ Error  ] 
[ Error  ] substring.scala:8:5: test2 depends on missing dependencies:
           def test2(): String = {
               ^
[ Error  ] Method bigSubstring
[ Error  ] substring.scala:10:5: 
               a.bigSubstring(1)
               ^^^^^^^^^^^^^^^^^
[ Fatal  ] Cannot recover from missing dependencies
[ Error  ] Stainless terminated with an error.
[ Error  ] Debug output is available in the file `stainless-stack-trace.txt`. If the crash is caused by Stainless, you may report your issue on https://github.com/epfl-lara/stainless/issues
[ Error  ] You may use --debug=stack to have the stack trace displayed in the output.

In

Apply(ExSelected("stainless", "lang", "package$", "StringDecorations"), stringExpr :: Nil),
and
Apply(ExSelected("stainless", "lang", "package$", "StringDecorations"), stringExpr :: Nil),

ExSelected could not match the corresponding method call, which causes bigSubstring to be treated as a regular method call. ExSymbol should be used.

@LioTree
Copy link
Author

LioTree commented Jul 19, 2024

fix: #1543

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

No branches or pull requests

2 participants