File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1958,6 +1958,13 @@ void AttributeChecker::visitFinalAttr(FinalAttr *attr) {
1958
1958
}
1959
1959
1960
1960
void AttributeChecker::visitMoveOnlyAttr (MoveOnlyAttr *attr) {
1961
+ if (!D->getASTContext ().LangOpts .hasFeature (Feature::MoveOnly)) {
1962
+ auto error =
1963
+ diag::experimental_moveonly_feature_can_only_be_used_when_enabled;
1964
+ diagnoseAndRemoveAttr (attr, error);
1965
+ return ;
1966
+ }
1967
+
1961
1968
if (isa<NominalTypeDecl>(D))
1962
1969
return ;
1963
1970
Original file line number Diff line number Diff line change 1
- // RUN: %target-typecheck-verify-swift -parse-stdlib -disable-availability-checking -verify-syntax-tree
1
+ // RUN: %target-typecheck-verify-swift -parse-stdlib -disable-availability-checking -verify-syntax-tree -enable-experimental-move-only
2
2
3
3
import Swift
4
4
You can’t perform that action at this time.
0 commit comments