forked from dotnet/fsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor component test compilation (dotnet#14747)
* refactor testdriver * Netstandard test case
- Loading branch information
1 parent
3c80121
commit 824b4e4
Showing
12 changed files
with
974 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02_asNetStandard20.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// regression test for 767815: Invalid code is generated when using field initializers in struct constructor | ||
|
||
module Experiment.Test | ||
|
||
[<Struct>] | ||
type Repro = | ||
val hash : int | ||
new(length) = | ||
{ hash = | ||
let mutable h = 0 | ||
for i=0 to length-1 do | ||
h <- 26*h | ||
h | ||
} | ||
|
||
let test() = | ||
let t = Repro(42) | ||
t.hash |
Oops, something went wrong.