Skip to content

Commit f720c73

Browse files
authored
Merge pull request #7230 from dotnet/merges/master-to-release/dev16.3
Merge master to release/dev16.3
2 parents 0abf39c + c4dba1f commit f720c73

13 files changed

+84
-58
lines changed

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19361.7">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19362.5">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>f1b09644408f45f43f5835786b3e4bdfd2e78141</Sha>
8+
<Sha>15f50ca6a9d0b441c9927421657fb9dc91206cc9</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
},
1212
"msbuild-sdks": {
13-
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19361.7",
13+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19362.5",
1414
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
1515
}
1616
}

src/fsharp/IlxGen.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2540,7 +2540,8 @@ and GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel =
25402540
GenSequel cenv eenv.cloc cgbuf sequel
25412541

25422542
and GenLinearExpr cenv cgbuf eenv sp expr sequel canProcessSequencePoint (contf: FakeUnit -> FakeUnit) =
2543-
match stripExpr expr with
2543+
let expr = stripExpr expr
2544+
match expr with
25442545
| LinearOpExpr (TOp.UnionCase c, tyargs, argsFront, argLast, m) ->
25452546
GenExprs cenv cgbuf eenv argsFront
25462547
GenLinearExpr cenv cgbuf eenv SPSuppress argLast Continue (* canProcessSequencePoint *) true (contf << (fun Fake ->

tests/fsharp/Compiler/CompilerAssert.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ module CompilerAssert =
167167
let errors = p.StandardError.ReadToEnd ()
168168
if not (String.IsNullOrWhiteSpace errors) then
169169
Assert.Fail errors
170+
171+
if p.ExitCode <> 0 then
172+
Assert.Fail(sprintf "Program exited with exit code %d" p.ExitCode)
170173
)
171174

172175
let CompileLibraryAndVerifyIL (source: string) (f: ILVerifier -> unit) =
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
2+
3+
namespace FSharp.Compiler.UnitTests
4+
5+
open NUnit.Framework
6+
open FSharp.Compiler.SourceCodeServices
7+
8+
[<TestFixture>]
9+
module ``Access Of Type Abbreviation`` =
10+
11+
[<Test>]
12+
let ``Test1``() =
13+
CompilerAssert.TypeCheckSingleError
14+
"""
15+
module Library =
16+
type private Hidden = Hidden of unit
17+
type Exported = Hidden
18+
"""
19+
FSharpErrorSeverity.Warning
20+
44
21+
(4, 8, 4, 16)
22+
"This construct is deprecated. The type 'Hidden' is less accessible than the value, member or type 'Exported' it is used in.\r\nAs of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors."
23+
24+
[<Test>]
25+
let ``Test2``() =
26+
CompilerAssert.Pass
27+
"""
28+
module Library =
29+
type internal Hidden = Hidden of unit
30+
type internal Exported = Hidden
31+
"""
32+
33+
[<Test>]
34+
let ``Test3``() =
35+
CompilerAssert.TypeCheckSingleError
36+
"""
37+
module Library =
38+
type internal Hidden = Hidden of unit
39+
type Exported = Hidden
40+
"""
41+
FSharpErrorSeverity.Warning
42+
44
43+
(4, 8, 4, 16)
44+
"This construct is deprecated. The type 'Hidden' is less accessible than the value, member or type 'Exported' it is used in.\r\nAs of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors."
45+
46+
[<Test>]
47+
let ``Test4``() =
48+
CompilerAssert.TypeCheckSingleError
49+
"""
50+
module Library =
51+
type private Hidden = Hidden of unit
52+
type internal Exported = Hidden
53+
"""
54+
FSharpErrorSeverity.Warning
55+
44
56+
(4, 17, 4, 25)
57+
"This construct is deprecated. The type 'Hidden' is less accessible than the value, member or type 'Exported' it is used in.\r\nAs of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors."
58+
59+
[<Test>]
60+
let ``Test5``() =
61+
CompilerAssert.Pass
62+
"""
63+
module Library =
64+
type private Hidden = Hidden of unit
65+
type private Exported = Hidden
66+
"""
67+
68+
[<Test>]
69+
let ``Test6``() =
70+
CompilerAssert.Pass
71+
"""
72+
module Library =
73+
type Hidden = Hidden of unit
74+
type Exported = Hidden
75+
"""

tests/fsharp/FSharpSuite.Tests.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<Compile Include="tests.fs" />
3434
<Compile Include="Compiler\ILChecker.fs" />
3535
<Compile Include="Compiler\CompilerAssert.fs" />
36+
<Compile Include="Compiler\ErrorMessages\AccessOfTypeAbbreviationTests.fs" />
3637
<Compile Include="Compiler\ErrorMessages\ElseBranchHasWrongTypeTests.fs" />
3738
<Compile Include="Compiler\ErrorMessages\MissingElseBranch.fs" />
3839
<Compile Include="Compiler\SourceTextTests.fs" />

tests/fsharpqa/Source/Warnings/AccessOfTypeAbbreviation.fs

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/fsharpqa/Source/Warnings/AccessOfTypeAbbreviation2.fs

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/fsharpqa/Source/Warnings/AccessOfTypeAbbreviation3.fs

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/fsharpqa/Source/Warnings/AccessOfTypeAbbreviation4.fs

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)