Skip to content

Commit 74fbe72

Browse files
authored
Merge pull request #1317 from dsyme/fix-1265
Fix 1265 - allowing the SOURCE_DIRECTORY token in the context of a type provider application
2 parents 8efd7f7 + d59c82f commit 74fbe72

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/fsharp/LexFilter.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer,
926926
| MINUS
927927
| GLOBAL
928928
| CONST
929+
| KEYWORD_STRING _
929930
| NULL
930931
| INT8 _ | INT16 _ | INT32 _ | INT64 _ | NATIVEINT _
931932
| UINT8 _ | UINT16 _ | UINT32 _ | UINT64 _ | UNATIVEINT _
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

22
neg95.fs(11,9,11,21): typecheck error FS0039: The value or constructor 'StructRecord' is not defined
33

4-
neg96.fs(14,17,14,18): typecheck error FS3205: This feature is deprecated. A 'use' binding may not be marked 'mutable'.
4+
neg96.fs(14,17,14,18): typecheck error FS3205: This feature is deprecated. A 'use' binding may not be marked 'mutable'.
5+
6+
neg96.fs(18,10,18,11): typecheck error FS0039: The type 'X' is not defined
7+
8+
neg96.fs(18,10,18,11): typecheck error FS0039: The type 'X' is not defined

tests/fsharp/typecheck/sigs/neg96.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ let x = StructRecord ()
1313
let invalidUse() =
1414
use mutable x = (null : System.IDisposable)
1515
()
16+
17+
18+
type T = X<__SOURCE_DIRECTORY__>
19+

0 commit comments

Comments
 (0)