some more bugfixes for the integer promotion rules
This commit is contained in:
parent
a6ee0eb299
commit
95faae2c0a
4 changed files with 9 additions and 8 deletions
|
|
@ -326,8 +326,9 @@ proc typeRel(mapping: var TIdTable, f, a: PType): TTypeRelation =
|
||||||
elif skipTypes(a, {tyRange}).kind == f.kind: result = isSubtype
|
elif skipTypes(a, {tyRange}).kind == f.kind: result = isSubtype
|
||||||
of tyRange:
|
of tyRange:
|
||||||
if a.kind == f.kind:
|
if a.kind == f.kind:
|
||||||
result = typeRel(mapping, base(a), base(f))
|
result = typeRel(mapping, base(f), base(a))
|
||||||
if result < isGeneric: result = isNone
|
# bugfix: accept integer conversions here
|
||||||
|
#if result < isGeneric: result = isNone
|
||||||
elif skipTypes(f, {tyRange}).kind == a.kind:
|
elif skipTypes(f, {tyRange}).kind == a.kind:
|
||||||
result = isIntConv
|
result = isIntConv
|
||||||
elif isConvertibleToRange(skipTypes(f, {tyRange}), a):
|
elif isConvertibleToRange(skipTypes(f, {tyRange}), a):
|
||||||
|
|
|
||||||
|
|
@ -368,7 +368,7 @@ when defined(windows):
|
||||||
lpWideCharStr = cstring(result),
|
lpWideCharStr = cstring(result),
|
||||||
cchWideChar = cint(result.len div 2),
|
cchWideChar = cint(result.len div 2),
|
||||||
lpMultiByteStr = cstring(res),
|
lpMultiByteStr = cstring(res),
|
||||||
cbMultiByte = cap)
|
cbMultiByte = cap.cint)
|
||||||
if m == 0:
|
if m == 0:
|
||||||
# try again; ask for capacity:
|
# try again; ask for capacity:
|
||||||
cap = WideCharToMultiByte(
|
cap = WideCharToMultiByte(
|
||||||
|
|
@ -386,7 +386,7 @@ when defined(windows):
|
||||||
lpWideCharStr = cstring(result),
|
lpWideCharStr = cstring(result),
|
||||||
cchWideChar = cint(result.len div 2),
|
cchWideChar = cint(result.len div 2),
|
||||||
lpMultiByteStr = cstring(res),
|
lpMultiByteStr = cstring(res),
|
||||||
cbMultiByte = cap)
|
cbMultiByte = cap.cint)
|
||||||
if m == 0: OSError()
|
if m == 0: OSError()
|
||||||
setLen(res, m)
|
setLen(res, m)
|
||||||
result = res
|
result = res
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import
|
||||||
osproc,
|
osproc,
|
||||||
cairowin32, cairoxlib,
|
cairowin32, cairoxlib,
|
||||||
gl, glut, glu, glx, glext, wingl,
|
gl, glut, glu, glx, glext, wingl,
|
||||||
lua, lualib, lauxlib, mysql, sqlite3, db_mongo, osproc
|
lua, lualib, lauxlib, mysql, sqlite3, db_mongo, md5
|
||||||
|
|
||||||
|
|
||||||
writeln(stdout, "test compilation of binding modules")
|
writeln(stdout, "test compilation of binding modules")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue