Taking the LHS type when a temporary result value was needed lead to bad code being generated if we get a tyRef. Fixes #9098
12 lines
161 B
Nim
12 lines
161 B
Nim
discard """
|
|
targets: "c cpp js"
|
|
output: '''
|
|
{'a', 'b'}
|
|
'''
|
|
"""
|
|
|
|
var x = new(ref set[char])
|
|
var y = new(ref set[char])
|
|
x[] = {'a'}
|
|
y[] = {'b'}
|
|
echo x[] + y[]
|