Sometimes sets are materialized as arrays and we must treat them as such: the CPP backend is pickier than the C one and would sometimes produce invalid code. Fixes #8967
10 lines
153 B
Nim
10 lines
153 B
Nim
discard """
|
|
targets: "c cpp"
|
|
"""
|
|
|
|
import marshal
|
|
|
|
let orig: set[char] = {'A'..'Z'}
|
|
let m = $$orig
|
|
let old = to[set[char]](m)
|
|
doAssert orig - old == {}
|