nim-strenc icon indicating copy to clipboard operation
nim-strenc copied to clipboard

Type mismatch: got <string> but expected static[string]

Open drygdryg opened this issue 3 years ago • 0 comments

A simple example that doesn't compile with an error:

import times
import strenc
let r_time = now().utc.format("yyyy-MM-dd'T'HH:mm:ss'.'ffffff'+00:00'")
echo r_time

Build log:

strenc_test.nim(3, 31) Hint: encrypt("yyyy-MM-dd\'T\'HH:mm:ss\'.\'ffffff\'+00:00\'") --> 'gkkaekgaEE(estring(")(+*y\x18\ez,-m\x1Fk\x05\x06u-,x07bh`^_\\]Z[\x19\x14\x00\x01\b\x03\x04\x12"),
           694030120)' [Pattern]
strenc_test.nim(3, 31) Hint: encrypt("yyyy-MM-dd\'T\'HH:mm:ss\'.\'ffffff\'+00:00\'") --> 'gkkaekgaEE(estring("\f\c\x0E\x0F\\=>_��ݩ�ķ���������������������"),
           1192352760)' [Pattern]
strenc_test.nim(3, 31) Error: type mismatch: got <string> but expected 'static[string]("yyyy-MM-dd\'T\'HH:mm:ss\'.\'ffffff\'+00:00\'")'

Nim compiler version: 1.4.2

drygdryg avatar Jan 04 '21 15:01 drygdryg