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
8
tests/typerel/tptrs.nim
Normal file
8
tests/typerel/tptrs.nim
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
discard """
|
||||
errormsg: "type mismatch: got <ptr int16> but expected 'ptr int'"
|
||||
line: 8
|
||||
"""
|
||||
|
||||
var
|
||||
n: int16
|
||||
p: ptr int = addr n
|
||||
Loading…
Add table
Add a link
Reference in a new issue