You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was messing around with invalid tilde starting path literals:
~foo is parsed to Ident(Ident(NODE_IDENT@2..4)), the ~ seemingly disappears into nowhere. The ident is retained as oo, i.e. in tvix you can evaluate let oo = 42; in ~foo. This literal should be a parse failure.
~foo/bar is parsed to Path(Path(NODE_PATH@2..8)), yielding the path oo/bar. This should also be a parse failure.
Nix forbids home path literals that don't start with ~/, so both expressions are invalid Nix. Probably significant out two chars are dropped from the literals and ~/ is also two chars long.
The text was updated successfully, but these errors were encountered:
Describe the bug
Was messing around with invalid tilde starting path literals:
~foo
is parsed toIdent(Ident(NODE_IDENT@2..4))
, the~
seemingly disappears into nowhere. The ident is retained asoo
, i.e. in tvix you can evaluatelet oo = 42; in ~foo
. This literal should be a parse failure.~foo/bar
is parsed toPath(Path(NODE_PATH@2..8))
, yielding the pathoo/bar
. This should also be a parse failure.Nix forbids home path literals that don't start with
~/
, so both expressions are invalid Nix. Probably significant out two chars are dropped from the literals and~/
is also two chars long.The text was updated successfully, but these errors were encountered: