Added better message for SC1007, for 'var= value'

This commit is contained in:
Vidar Holen 2014-02-12 18:26:41 -08:00
parent 2ec60c2627
commit 661091a9da
1 changed files with 2 additions and 1 deletions

View File

@ -1734,7 +1734,8 @@ readAssignmentWord = try $ do
if space == "" && space2 /= ""
then do
when (variable /= "IFS") $
parseNoteAt pos InfoC 1007 $ "Note that 'var= value' (with space after equals sign) is similar to 'var=\"\"; value'."
parseNoteAt pos WarningC 1007
"Remove space after = if trying to assign a value (for empty string, use var='' ... )."
value <- readEmptyLiteral
return $ T_Assignment id op variable index value
else do