summaryrefslogtreecommitdiff
path: root/Source/Dafny/DafnyAst.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Dafny/DafnyAst.cs')
-rw-r--r--Source/Dafny/DafnyAst.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Dafny/DafnyAst.cs b/Source/Dafny/DafnyAst.cs
index 6da3138c..1f3326da 100644
--- a/Source/Dafny/DafnyAst.cs
+++ b/Source/Dafny/DafnyAst.cs
@@ -539,7 +539,16 @@ namespace Microsoft.Dafny {
} else if (ResolvedClass is CoDatatypeDecl) {
return false;
} else if (ResolvedClass is IndDatatypeDecl) {
+ var dt = (IndDatatypeDecl)ResolvedClass;
// TODO
+ // For now, say 'no' if some constructor takes a parameter that is a codatatype. This is BOGUS.
+ foreach (var ctor in dt.Ctors) {
+ foreach (var arg in ctor.Formals) {
+ if (arg.Type.IsCoDatatype) {
+ return false;
+ }
+ }
+ }
return true;
} else if (ResolvedParam != null) {
return ResolvedParam.MustSupportEquality;