mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-25 16:53:59 +00:00
fixes #4428
This commit is contained in:
@@ -69,13 +69,19 @@ proc sameMethodBucket(a, b: PSym): MethodResult =
|
||||
else:
|
||||
break
|
||||
if sameType(aa, bb):
|
||||
if aa.kind == tyObject and result != Invalid: result = Yes
|
||||
if aa.kind == tyObject and result != Invalid:
|
||||
result = Yes
|
||||
elif aa.kind == tyObject and bb.kind == tyObject:
|
||||
let diff = inheritanceDiff(bb, aa)
|
||||
if diff < 0:
|
||||
if result != Invalid: result = Yes
|
||||
if result != Invalid:
|
||||
result = Yes
|
||||
else:
|
||||
return No
|
||||
elif diff != high(int):
|
||||
result = Invalid
|
||||
else:
|
||||
return No
|
||||
else:
|
||||
return No
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ proc docstringSummary(rstText: string): string =
|
||||
## Also, we hope to not break the rst, but maybe we do. If there is any
|
||||
## trimming done, an ellipsis unicode char is added.
|
||||
const maxDocstringChars = 100
|
||||
assert (rstText.len < 2 or (rstText[0] == '#' and rstText[1] == '#'))
|
||||
assert(rstText.len < 2 or (rstText[0] == '#' and rstText[1] == '#'))
|
||||
result = rstText.substr(2).strip
|
||||
var pos = result.find('\L')
|
||||
if pos > 0:
|
||||
|
||||
Reference in New Issue
Block a user