forked from lix-project/lix
Merge branch 'pos-crash-fix' of git://github.com/dezgeg/nix
This commit is contained in:
commit
e2b028353b
|
@ -628,7 +628,7 @@ void EvalState::mkThunk_(Value & v, Expr * expr)
|
||||||
|
|
||||||
void EvalState::mkPos(Value & v, Pos * pos)
|
void EvalState::mkPos(Value & v, Pos * pos)
|
||||||
{
|
{
|
||||||
if (pos) {
|
if (pos && pos->file.set()) {
|
||||||
mkAttrs(v, 3);
|
mkAttrs(v, 3);
|
||||||
mkString(*allocAttr(v, sFile), pos->file);
|
mkString(*allocAttr(v, sFile), pos->file);
|
||||||
mkInt(*allocAttr(v, sLine), pos->line);
|
mkInt(*allocAttr(v, sLine), pos->line);
|
||||||
|
|
1
tests/lang/eval-okay-getattrpos-undefined.exp
Normal file
1
tests/lang/eval-okay-getattrpos-undefined.exp
Normal file
|
@ -0,0 +1 @@
|
||||||
|
null
|
1
tests/lang/eval-okay-getattrpos-undefined.nix
Normal file
1
tests/lang/eval-okay-getattrpos-undefined.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
builtins.unsafeGetAttrPos "abort" builtins
|
Loading…
Reference in a new issue