You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Show warning when DU is accessed without type but RequiredQualifiedAccess was set
fixesdotnet#95closesdotnet#103commit 8bc07748cd50a0436b39de6066e4c2aaf52d8be0Author: latkin <latkin@microsoft.com>Date: Mon Jan 26 16:47:06 2015 -0800 Fix typo in test baselinecommit 210baa88919d8bcd37db9fc1e0f9911acbc317e7Author: latkin <latkin@microsoft.com>Date: Mon Jan 26 16:46:28 2015 -0800 Fix improper unqualified DU accesses in project systemcommitef1fb6bAuthor: Steffen Forkmann <steffen.forkmann@msu-solutions.de>Date: Mon Jan 26 17:51:05 2015 +0100 Put Deprecated message into FSComp.txt - relates todotnet#95commitfa5e972Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>Date: Mon Jan 26 16:03:38 2015 +0100 Add test for DU which is accessed without type but RequiredQualifiedAccess was set - relates todotnet#95commite8a652eAuthor: Steffen Forkmann <steffen.forkmann@msu-solutions.de>Date: Mon Jan 26 10:00:43 2015 +0100 Fix a case wheredotnet#95 is violated in the compiler itselfcommit7c9c968Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>Date: Sun Jan 25 20:10:05 2015 +0100 Show warning when DU is accessed without type but RequiredQualifiedAccess was set -closesdotnet#95
1133,nrNoConstructorsAvailableForType,"No constructors are available for the type '%s'"
1025
+
1134,nrUnionTypeNeedsQualifiedAccess,"The union type for union case '%s' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('%s') in the name you are using.""
Copy file name to clipboardExpand all lines: src/fsharp/check.fs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1471,6 +1471,6 @@ let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu
1471
1471
1472
1472
CheckModuleExpr cenv env mexpr;
1473
1473
CheckAttribs cenv env extraAttribs;
1474
-
if cenv.usesQuotations&& QuotationTranslator.QuotationGenerationScope.ComputeQuotationFormat(cenv.g)= QuotationTranslator.FSharp_20_Plusthen
1474
+
if cenv.usesQuotations&& QuotationTranslator.QuotationGenerationScope.ComputeQuotationFormat(cenv.g)= QuotationTranslator.QuotationSerializationFormat.FSharp_20_Plusthen
Copy file name to clipboardExpand all lines: tests/fsharp/typecheck/sigs/neg90.bsl
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,3 +4,5 @@ neg90.fs(4,9,4,12): typecheck error FS0001: A generic construct requires that th
4
4
neg90.fs(7,22,7,25): typecheck error FS0039: The type 'foo' isnot defined
5
5
6
6
neg90.fs(7,22,7,25): typecheck error FS0039: The type 'foo' isnot defined
7
+
8
+
neg90.fs(16,9,16,21): typecheck error FS0035: This construct is deprecated: The union typefor union case 'Member' was defined with the RequireQualifiedAccessAttribute. Include the name of the uniontype('DU')in the name you are using.'