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:
LemonBoy 2019-01-22 11:17:20 +01:00 • committed by Andreas Rumpf
commit 6825430831
3 changed files with 18 additions and 6 deletions

8
tests/typerel/tptrs.nim Normal file
View 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