mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-19 19:17:15 +00:00
Because `prevFields` and `currentFields` have been already quoted by
`'`, no need to add another.
The error message was
```
The fields ''x'' and ''y'' cannot be initialized together, because they are from conflicting branches in the case object.
```
(cherry picked from commit cdb750c962)
16 lines
273 B
Nim
16 lines
273 B
Nim
discard """
|
|
errormsg: '''
|
|
The fields 'x' and 'y' cannot be initialized together, because they are from conflicting branches in the case object.
|
|
'''
|
|
"""
|
|
|
|
type
|
|
Foo = object
|
|
case kind: bool
|
|
of true:
|
|
x: int
|
|
of false:
|
|
y: int
|
|
|
|
|
|
var f = Foo(x: 1, y: 1) |