Skip to content

Commit 519e942

Browse files
committed
Added another comment
1 parent ba85865 commit 519e942

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/scala/viper/silver/parser/ParseAst.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ class PTypeSubstitution(val m:Map[String,PType]) //extends Map[String,PType]()
393393
val ts = PTypeSubstitution(Map(a -> b))
394394
PTypeSubstitution(m.map(kv => kv._1 -> kv._2.substitute(ts)))
395395
}
396+
397+
// The following methods all return a type substitution if successful,
398+
// otherwise a pair containing the expected and the found type.
396399
def *(other:PTypeSubstitution) : Either[(PType, PType), PTypeSubstitution] =
397400
other.m.foldLeft(Right(this):Either[(PType, PType), PTypeSubstitution])({
398401
case (Right(s),p)=>s.add(PTypeVar(p._1),p._2);

0 commit comments

Comments
 (0)