Files
Nim/tests/errmsgs/tconflictingfields.nim
ringabout f0b22a7620 minor improvements of error messages of objvariants (#25040)
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)
2025-09-17 09:04:05 +02:00

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)