Skip to content

Commit

Permalink
fix rules check typename in varAllowedForType
Browse files Browse the repository at this point in the history
  • Loading branch information
pyros2097 committed Jan 15, 2016
1 parent 35f78a4 commit 71c79f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,13 @@ func varTypeAllowedForType(varType Type, expectedType Type) bool {
return varTypeAllowedForType(varType.OfType, expectedType.OfType)
}
}
return varType == expectedType
if varType == expectedType {
return true
}
if varType.Name() == expectedType.Name() {
return true
}
return false
}

/**
Expand Down

0 comments on commit 71c79f2

Please sign in to comment.