public static boolean isConstructorName(String name) {
int p = name.lastIndexOf('.');
char firstChar = name.charAt(p<0 ? 0 : p+1);
- return Character.isUpperCase(firstChar);
+ return Character.isUpperCase(firstChar) || firstChar == '(';
}
/* Tries to resolve name as a local variable. It is assumed
EConstant other = (EConstant)expression;
return value == other.value && Types.equals(typeParameters, other.typeParameters);
}
+
+ @Override
+ public boolean isConstructorApplication() {
+ return true;
+ }
}
return value.equals(other.value);
}
+ @Override
+ public boolean isConstructorApplication() {
+ return true;
+ }
}
@Test public void RedBlackTrees() { test(); }
@Test public void Relations1() { test(); }
@Test public void Relations2() { test(); }
+ @Test public void RepeatedVariableDefinitionBug() { test(); }
@Test public void RepeatedVariableInPattern() { test(); }
@Test public void Scanl() { test(); }
@Test public void Search() { test(); }
--- /dev/null
+import "Prelude"
+
+test1 :: ()
+test1 = do
+ (problem, foo) = (1, 2)
+ problem = 1
+ (problem, bar) = (3, 4)
+ ()
+
+test2 :: ()
+test2 = do
+ (problem, foo) = (1, 2)
+ (problem, bar) = (3, 4)
+ ()
+
+main = ()
+--
+()
\ No newline at end of file