mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-15 16:13:45 +00:00
Preserves implicit imports instead of always storing the resolved absolute filename. That lets the later StdPrefix warning check see the original std/objectdollar spelling. This is for situations where in cfg or cli warnings are enabled for the prefix. Essentially a niche combination of compiler switches don't get along e.g. `-d:nimPreviewSlimSystem --warning:StdPrefix:on --warningAsError:StdPrefix:on --import:std/objectdollar` will cause: `Error: objectdollar needs the 'std' prefix [StdPrefix]`
11 lines
223 B
Nim
11 lines
223 B
Nim
discard """
|
|
matrix: "-d:nimPreviewSlimSystem --warning:StdPrefix:on --warningAsError:StdPrefix:on --import:std/objectdollar"
|
|
output: "(a: 23, b: 45)"
|
|
"""
|
|
|
|
type Foo = object
|
|
a, b: int
|
|
|
|
let x = Foo(a: 23, b: 45)
|
|
echo x
|