Fix infinite recursion when printing unrecognized linktype
Bug: N/A Test: remove some cases from String() so that some linktypes go to the default path. Then run m nothing. No infinite recursion. Error is correctly shown. PANIC=String method: unrecognized linktype: 5 Change-Id: I424755bc89871fc2144ff22d6391f57157cd434d Change-Id: Ice791025dc50f44ffabd1050bafc5ea35023d32c
This commit is contained in:
@@ -1038,7 +1038,7 @@ func (lt linkType) String() string {
|
||||
case javaPlatform:
|
||||
return "private API"
|
||||
default:
|
||||
panic(fmt.Errorf("unrecognized linktype: %v", lt))
|
||||
panic(fmt.Errorf("unrecognized linktype: %d", lt))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user