Skip to content

Commit cfe80b7

Browse files
committed
test by hardcoding nullability in script files
1 parent 475ce96 commit cfe80b7

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/FsAutoComplete.Core/CompilerServiceInterface.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe
367367
)
368368

369369
let allFlags =
370-
Array.append [| "--targetprofile:netstandard" |] fsiAdditionalArguments
370+
Array.append [| "--targetprofile:netstandard"; "--checknulls+"; "--define:NULLABLE" |] fsiAdditionalArguments
371371

372372
let! (opts, errors) =
373373
checker.GetProjectOptionsFromScript(

src/FsAutoComplete.Core/SignatureFormatter.fs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ module SignatureFormatter =
4343
let rec formatFSharpType (context: FSharpDisplayContext) (typ: FSharpType) : string =
4444
let context = context.WithPrefixGenericParameters()
4545

46-
let nullabilityClause =
47-
if typ.HasNullAnnotation || typ.IsNullAmbivalent then
48-
" | null"
49-
else
50-
""
46+
let nullabilityClause = if typ.HasNullAnnotation then " | null" else ""
5147

5248
try
5349
if typ.IsTupleType || typ.IsStructTupleType then

0 commit comments

Comments
 (0)