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 @@ -1950,6 +1950,13 @@ void AttributeChecker::visitFinalAttr(FinalAttr *attr) {
1950
1950
}
1951
1951
1952
1952
void AttributeChecker::visitMoveOnlyAttr (MoveOnlyAttr *attr) {
1953
+ if (!D->getASTContext ().LangOpts .hasFeature (Feature::MoveOnly)) {
1954
+ auto error =
1955
+ diag::experimental_moveonly_feature_can_only_be_used_when_enabled;
1956
+ diagnoseAndRemoveAttr (attr, error);
1957
+ return ;
1958
+ }
1959
+
1953
1960
if (isa<NominalTypeDecl>(D))
1954
1961
return ;
1955
1962
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