Mantis - Mascot
Erweiterte Problemanzeige
75 general kleinerer Fehler nicht getestet 2011-08-08 16:17 2012-08-29 20:17
sigonnea  
xclerc  
normal  
erledigt  
erledigt  
keine    
keine 1.0  
0000075: '?' should not be followed by whitespace when is refers to an optional label.
This means that the following:

    let f ?(foo = xxx) = ...

should be accepted.
Below is a small patch that corrects this bug.

diff --git a/src/checks/typo_spacesAroundOperators.ml b/src/checks/typo_spacesAroundOperators.ml
index 9909b79..2d9046e 100644
--- a/src/checks/typo_spacesAroundOperators.ml
+++ b/src/checks/typo_spacesAroundOperators.ml
@@ -46,7 +46,7 @@ let run _ _ (_, tokens) _ report =
         (match s.[0] with
         | '-' | '~' ->
             Camlp4Utils.check_white "operator" s err prev
- | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | '?' | '@' | '^' | '|' ->
+ | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | (* '?' | *) '@' | '^' | '|' ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
         | ':' when len > 1 && s.[1] = ':' ->
Problem-Historie
2011-08-08 16:17 sigonnea Neues Problem
2012-08-29 20:17 xclerc Status neu => erledigt
2012-08-29 20:17 xclerc Behoben in Version => 1.0
2012-08-29 20:17 xclerc Lösung offen => erledigt
2012-08-29 20:17 xclerc Bearbeitung durch => xclerc

Zu diesem Problem gibt es keine Notizen.