-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10085 from dotnet/merges/main-to-release/dev16.8
Merge main to release/dev16.8
- Loading branch information
Showing
3 changed files
with
41 additions
and
8 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
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,28 @@ | ||
module Pos38 | ||
|
||
type Expression = | ||
| EndOp | ||
| BinaryOp of Expression * Expression | ||
|
||
let mutable count = 0 | ||
|
||
[<AutoOpen>] | ||
module Extensions = | ||
|
||
type Expression with | ||
|
||
member this.Foobar2 : unit = | ||
match this with | ||
| BinaryOp (_, e2) -> | ||
e2.Foobar2 | ||
| EndOp -> | ||
count <- count + 1 | ||
() | ||
|
||
|
||
let c = BinaryOp(EndOp, EndOp) | ||
|
||
c.Foobar2 | ||
|
||
if count <> 1 then failwith "incorrect count" | ||
|