Fix bug with code that ensures that type annotations are right above their corresponding definition. Due to a lack of parens, the check only worked with one type annotation.
commit3c245ed61297e7bb143566dce3c7546d4c5ea43d
authorevancz <info@elm-lang.org>
dateThu 7 Feb 2013, 01:22 (14 years ago)
parentecc49ca
elm/src/Types/Alias.hs+1−1
@@ -122,7 +122,7 @@ badOrder stmts = map msg $ missings (sort $ expectedPairs as ds) (sort $ actualP
122122 actualPairs stmts =
123123 case stmts of
124124 TypeAnnotation n _ : Definition d : rest ->
125− if n == defName d then [n] else [] ++ actualPairs rest
125+ (if n == defName d then [n] else []) ++ actualPairs rest
126126 t:s:rest -> actualPairs (s:rest)
127127 _ -> []
128128