Skip to content

Commit

Permalink
Added missing case for identical types to merge when merging type var…
Browse files Browse the repository at this point in the history
…iables across branches.
  • Loading branch information
mcoblenz committed Jan 22, 2020
1 parent 9aeb1e2 commit a29e12a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/scala/edu/cmu/cs/obsidian/typecheck/Checker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,10 @@ class Checker(globalTable: SymbolTable, verbose: Boolean = false) {
Some(StateType(ct, unionStates, NotRemoteReferenceType()))

case (g1@GenericType(gVar1, gBound1), g2@GenericType(gVar2, gBound2)) =>
if (gVar1.permissionVar.isDefined && gVar2.permissionVar.isDefined) {
if (g1 == g2) {
Some(g1)
}
else if (gVar1.permissionVar.isDefined && gVar2.permissionVar.isDefined) {
Some(t1)
} else {
val typeForMismatchedPermissions =
Expand Down

0 comments on commit a29e12a

Please sign in to comment.