Skip to content

unexpected result from functions in file but not from code in console #18107

Open
@oivulf

Description

@oivulf

Compiler version

tried 3.1.1 and 3.2.1

Minimized code

I attach the build.sbt and single testA.sc source file.
test in sbt console with
:load testA.sc
val (res, p)=doTest
val (res, p)=doTest
res.map(p)

Expectation

my expectation would be that res.map(p) yield always the same value, that is the one
printed the first time one runs doTest and when issuing res.map(p) in console.
however, res.map(p) in the code and in console are behaving differently since the second
time doTest is called. I understand that results may differ through different calls of doTest,
since an external library is involved, however the fact remains that res.map(p) behaves differently
inside doTest and outside.

bug.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions