diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2019-01-21 17:27:36 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-01-21 17:27:36 +0100 |
commit | ae5d8fbd9d6b0c6469c2245da8a54d7b4c12f54f (patch) | |
tree | 56a5cd0237a34b1f8d13d6e64816816acd22080b /compiler | |
parent | a4cdd25b19b0ec98826a01e1f57da1c2fb8920af (diff) | |
download | Nim-ae5d8fbd9d6b0c6469c2245da8a54d7b4c12f54f.tar.gz |
Proper check for tyStatic[T] -> U conversions (#10382)
Drop the outer tyStatic shell then perform the check. Fixes #7609
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 5e1e4cbbd..82f948492 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -108,6 +108,8 @@ const proc checkConvertible(c: PContext, castDest, src: PType): TConvStatus = result = convOK + # We're interested in the inner type and not in the static tag + var src = src.skipTypes({tyStatic}) if sameType(castDest, src) and castDest.sym == src.sym: # don't annoy conversions that may be needed on another processor: if castDest.kind notin IntegralTypes+{tyRange}: |