viperproject / chalice2silver

Other
0 stars 0 forks source link

Typechecker does not capture the case when fork shadows method argument #70

Open viper-admin opened 9 years ago

viper-admin commented 9 years ago

Created by @vakaras on 2015-07-10 13:37

Method arguments in Chalice are immutable. Therefore, the following example should fail to typecheck:

#!Chalice
class Test {
  method bar()
  {
  }
  method test1(tk: token<Test.bar>)
  {
    fork tk := bar() // This line should not typecheck.
  }
}

However, it passes through the type checker and program translator component crashes.