Skip to content

Commit c3406e7

Browse files
gustybaronfel
authored andcommitted
Consider '_' for members with access modifiers (#7631)
* Consider '_' for members with access modifiers * Add tests * Revert * Add tests with modifiers
1 parent 2d5f5f4 commit c3406e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/fsharp/pars.fsy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,11 @@ atomicPatternLongIdent:
19241924
}
19251925
| GLOBAL DOT pathOp { let (LongIdentWithDots(lid,dotms)) = $3 in (None,LongIdentWithDots(ident(MangledGlobalName,rhs parseState 1) :: lid, rhs parseState 2 :: dotms)) }
19261926
| pathOp { (None,$1) }
1927+
| access UNDERSCORE DOT pathOp {
1928+
if not (parseState.LexBuffer.SupportsFeature LanguageFeature.SingleUnderscorePattern) then
1929+
raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedSymbolDot())
1930+
let (LongIdentWithDots(lid,dotms)) = $4 in (Some($1),LongIdentWithDots(ident("_",rhs parseState 1)::lid, rhs parseState 2::dotms))
1931+
}
19271932
| access pathOp { (Some($1), $2) }
19281933

19291934

0 commit comments

Comments
 (0)