Restrict ptr/ref to ptr/ref implicit conversion (#10411)
* Restrict ptr/ref to ptr/ref implicit conversion Fixes #10409 * Make the ptr conversions explicit in db_odbc
This commit is contained in:
parent
39e1cd2bf6
commit
6825430831
3 changed files with 18 additions and 6 deletions
|
|
@ -1316,7 +1316,7 @@ proc typeRelImpl(c: var TCandidate, f, aOrig: PType,
|
|||
if typeRel(c, f.sons[i], a.sons[i]) == isNone: return isNone
|
||||
result = typeRel(c, f.lastSon, a.lastSon, flags + {trNoCovariance})
|
||||
subtypeCheck()
|
||||
if result <= isConvertible: result = isNone
|
||||
if result <= isIntConv: result = isNone
|
||||
elif tfNotNil in f.flags and tfNotNil notin a.flags:
|
||||
result = isNilConversion
|
||||
elif a.kind == tyNil: result = f.allowsNil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue