You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When invoking an effect-polymorphic method, the resulting effect consists of the latent, absolute effect, plus the effect of the argument.
The error message currently does not distinguish where the effect mismatch originates, so it is hard to find the cause of an effect mismatch sometimes:
def h(f: Int => Int): Int @rel(f) = f(10)
def test: Int @pure = {
val x = 1
h(x => {
println()
x + 1
})
}
The error is reported at the invocation of h, not at the println() statement:
T.scala:45: error: effect type mismatch;
found : @mod(any) @assign(any) @loc(any)
required: @mod(x,f$1) @assign(x,any) @assign(f$1,any) @loc(any)
@mod(any) does not conform to @mod(x,f$1)
@assign(any) does not conform to @assign(x,any) @assign(f$1,any)
h(x => {
^
The text was updated successfully, but these errors were encountered:
When invoking an effect-polymorphic method, the resulting effect consists of the latent, absolute effect, plus the effect of the argument.
The error message currently does not distinguish where the effect mismatch originates, so it is hard to find the cause of an effect mismatch sometimes:
The error is reported at the invocation of
h
, not at theprintln()
statement:The text was updated successfully, but these errors were encountered: