Closed
Description
I found this by accident, left the .
property reference while testing ideas.
I think it is incorrect that this code goes without any errors, and also generates no result.
Steps to reproduce
$Departments = @'
Alpha
Beta
Gamma
Zulu
'@. -split '\r'
Expected behavior
At line:6 char:4
+ '@.
+ ~
Missing property name after reference operator.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingPropertyName
Actual behavior
Exactly, nothing happens, no error, no result. Any unary operator seems to do this. A non-unary operator will generate two error messages, missing property, and unexpected token (for the right operand).
Environment data
PowerShell 6.2 on Windows 10 1809
Windows PowerShell 5.1 (same OS)