summaryrefslogtreecommitdiff
path: root/src/tools/tool-options.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/tool-options.h')
-rw-r--r--src/tools/tool-options.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/tool-options.h b/src/tools/tool-options.h
index bc948fc97..c15291c8d 100644
--- a/src/tools/tool-options.h
+++ b/src/tools/tool-options.h
@@ -176,6 +176,12 @@ struct ToolOptions : public Options {
void applyFeatures(Module& module) const {
module.features.enable(enabledFeatures);
module.features.disable(disabledFeatures);
+ // Non-default type systems only make sense with GC enabled. TODO: Error on
+ // non-GC equirecursive types as well once we make isorecursive the default
+ // if we don't remove equirecursive types entirely.
+ if (!module.features.hasGC() && getTypeSystem() == TypeSystem::Nominal) {
+ Fatal() << "Nominal typing is only allowed when GC is enabled";
+ }
}
private: