effekt icon indicating copy to clipboard operation
effekt copied to clipboard

Explicitly binding capabilities triggers spurious warning

Open b-studios opened this issue 1 year ago • 2 comments

effect Exc(): Unit
def main() =
  try { e.Exc() } with e: Exc { () }

image

Expected behavior: No warning.

b-studios avatar Sep 22 '22 14:09 b-studios

Today I've independently ran into this issue as well. Screenshot 2022-09-23 at 10 36 51

effect Foo {
  def foo(): String
} 

def main() = {
  try { f.foo() }
  with f : Foo { 
    def foo() = resume("bar") 
  }
}

jiribenes avatar Sep 23 '22 08:09 jiribenes

Yes, this is guaranteed to occur every single time, since we do not consider bound capabilities as "effect usage" at the moment. :)

b-studios avatar Sep 23 '22 08:09 b-studios