Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
ffb39091
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ffb39091
编写于
11月 22, 2022
作者:
V
Vlad Zarytovskii
提交者:
GitHub
11月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14373 from dotnet/merges/main-to-release/dev17.5
上级
ac595d12
f5760cfa
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
88 addition
and
25 deletion
+88
-25
src/Compiler/Checking/CheckBasics.fs
src/Compiler/Checking/CheckBasics.fs
+5
-1
src/Compiler/Checking/CheckBasics.fsi
src/Compiler/Checking/CheckBasics.fsi
+4
-0
src/Compiler/Checking/CheckDeclarations.fs
src/Compiler/Checking/CheckDeclarations.fs
+36
-16
src/Compiler/Checking/CheckDeclarations.fsi
src/Compiler/Checking/CheckDeclarations.fsi
+11
-2
src/Compiler/Checking/CheckExpressions.fs
src/Compiler/Checking/CheckExpressions.fs
+4
-2
src/Compiler/Checking/CheckIncrementalClasses.fs
src/Compiler/Checking/CheckIncrementalClasses.fs
+4
-1
src/Compiler/Driver/ParseAndCheckInputs.fs
src/Compiler/Driver/ParseAndCheckInputs.fs
+6
-3
src/Compiler/Facilities/DiagnosticOptions.fs
src/Compiler/Facilities/DiagnosticOptions.fs
+3
-0
src/Compiler/Facilities/DiagnosticOptions.fsi
src/Compiler/Facilities/DiagnosticOptions.fsi
+2
-0
tests/FSharp.Compiler.ComponentTests/Language/XmlComments.fs
tests/FSharp.Compiler.ComponentTests/Language/XmlComments.fs
+11
-0
tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected
...s/FSharp.CompilerService.SurfaceArea.netstandard.expected
+2
-0
未找到文件。
src/Compiler/Checking/CheckBasics.fs
浏览文件 @
ffb39091
...
...
@@ -4,6 +4,7 @@ module internal FSharp.Compiler.CheckBasics
open
System
.
Collections
.
Generic
open
FSharp
.
Compiler
.
Diagnostics
open
Internal
.
Utilities
.
Library
open
Internal
.
Utilities
.
Library
.
Extras
open
FSharp
.
Compiler
...
...
@@ -310,6 +311,8 @@ type TcFileState =
isInternalTestSpanStackReferring
:
bool
diagnosticOptions
:
FSharpDiagnosticOptions
// forward call
TcPat
:
WarnOnUpperFlag
->
TcFileState
->
TcEnv
->
PrelimValReprInfo
option
->
TcPatValFlags
->
TcPatLinearEnv
->
TType
->
SynPat
->
(
TcPatPhase2Input
->
Pattern
)
*
TcPatLinearEnv
...
...
@@ -328,7 +331,7 @@ type TcFileState =
/// Create a new compilation environment
static
member
Create
(
g
,
isScript
,
amap
,
thisCcu
,
isSig
,
haveSig
,
conditionalDefines
,
tcSink
,
tcVal
,
isInternalTestSpanStackReferring
,
(
g
,
isScript
,
amap
,
thisCcu
,
isSig
,
haveSig
,
conditionalDefines
,
tcSink
,
tcVal
,
isInternalTestSpanStackReferring
,
diagnosticOptions
,
tcPat
,
tcSimplePats
,
tcSequenceExpressionEntry
,
...
...
@@ -358,6 +361,7 @@ type TcFileState =
compilingCanonicalFslibModuleType
=
(
isSig
||
not
haveSig
)
&&
g
.
compilingFSharpCore
conditionalDefines
=
conditionalDefines
isInternalTestSpanStackReferring
=
isInternalTestSpanStackReferring
diagnosticOptions
=
diagnosticOptions
TcPat
=
tcPat
TcSimplePats
=
tcSimplePats
TcSequenceExpressionEntry
=
tcSequenceExpressionEntry
...
...
src/Compiler/Checking/CheckBasics.fsi
浏览文件 @
ffb39091
...
...
@@ -3,6 +3,7 @@
module
internal
FSharp
.
Compiler
.
CheckBasics
open
System
.
Collections
.
Generic
open
FSharp
.
Compiler
.
Diagnostics
open
Internal
.
Utilities
.
Library
open
FSharp
.
Compiler
.
AccessibilityLogic
open
FSharp
.
Compiler
.
CompilerGlobalState
...
...
@@ -260,6 +261,8 @@ type TcFileState =
isInternalTestSpanStackReferring
:
bool
diagnosticOptions
:
FSharpDiagnosticOptions
// forward call
TcPat
:
WarnOnUpperFlag
->
TcFileState
...
...
@@ -319,6 +322,7 @@ type TcFileState =
tcSink
:
TcResultsSink
*
tcVal
:
TcValF
*
isInternalTestSpanStackReferring
:
bool
*
diagnosticOptions
:
FSharpDiagnosticOptions
*
tcPat
:
(
WarnOnUpperFlag
->
TcFileState
->
TcEnv
->
PrelimValReprInfo
option
->
TcPatValFlags
->
TcPatLinearEnv
->
TType
->
SynPat
->
(
TcPatPhase2Input
->
Pattern
)
*
TcPatLinearEnv
)
*
tcSimplePats
:
(
TcFileState
->
bool
->
CheckConstraints
->
TType
->
TcEnv
->
TcPatLinearEnv
->
SynSimplePats
->
string
list
*
TcPatLinearEnv
)
*
tcSequenceExpressionEntry
:
(
TcFileState
->
TcEnv
->
OverallTy
->
UnscopedTyparEnv
->
bool
*
SynExpr
->
range
->
Expr
*
UnscopedTyparEnv
)
*
...
...
src/Compiler/Checking/CheckDeclarations.fs
浏览文件 @
ffb39091
...
...
@@ -456,14 +456,17 @@ module TcRecdUnionAndEnumDeclarations =
let
TcAnonFieldDecl
cenv
env
parent
tpenv
nm
(
SynField
(
Attributes
attribs
,
isStatic
,
idOpt
,
ty
,
isMutable
,
xmldoc
,
vis
,
m
,
_))
=
let
mName
=
m
.
MakeSynthetic
()
let
id
=
match
idOpt
with
None
->
mkSynId
mName
nm
|
Some
id
->
id
let
xmlDoc
=
xmldoc
.
ToXmlDoc
(
true
,
Some
[]
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xmldoc
.
ToXmlDoc
(
checkXmlDocs
,
Some
[]
)
TcFieldDecl
cenv
env
parent
false
tpenv
(
isStatic
,
attribs
,
id
,
idOpt
.
IsNone
,
ty
,
isMutable
,
xmlDoc
,
vis
,
m
)
let
TcNamedFieldDecl
cenv
env
parent
isIncrClass
tpenv
(
SynField
(
Attributes
attribs
,
isStatic
,
id
,
ty
,
isMutable
,
xmldoc
,
vis
,
m
,
_))
=
match
id
with
|
None
->
error
(
Error
(
FSComp
.
SR
.
tcFieldRequiresName
()
,
m
))
|
Some
id
->
let
xmlDoc
=
xmldoc
.
ToXmlDoc
(
true
,
Some
[]
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xmldoc
.
ToXmlDoc
(
checkXmlDocs
,
Some
[]
)
TcFieldDecl
cenv
env
parent
isIncrClass
tpenv
(
isStatic
,
attribs
,
id
,
false
,
ty
,
isMutable
,
xmlDoc
,
vis
,
m
)
let
TcNamedFieldDecls
cenv
env
parent
isIncrClass
tpenv
fields
=
...
...
@@ -552,7 +555,8 @@ module TcRecdUnionAndEnumDeclarations =
|>
Seq
.
map
(
fun
f
->
f
.
DisplayNameCore
)
|>
Seq
.
toList
let
xmlDoc
=
xmldoc
.
ToXmlDoc
(
true
,
Some
names
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xmldoc
.
ToXmlDoc
(
checkXmlDocs
,
Some
names
)
Construct
.
NewUnionCase
id
rfields
recordTy
attrs
xmlDoc
vis
let
TcUnionCaseDecls
(
cenv
:
cenv
)
env
(
parent
:
ParentRef
)
(
thisTy
:
TType
)
(
thisTyInst
:
TypeInst
)
hasRQAAttribute
tpenv
unionCases
=
...
...
@@ -571,7 +575,8 @@ module TcRecdUnionAndEnumDeclarations =
let
vis
,
_
=
ComputeAccessAndCompPath
env
None
m
None
None
parent
let
vis
=
CombineReprAccess
parent
vis
if
id
.
idText
=
"value__"
then
errorR
(
Error
(
FSComp
.
SR
.
tcNotValidEnumCaseName
()
,
id
.
idRange
))
let
xmlDoc
=
xmldoc
.
ToXmlDoc
(
true
,
Some
[]
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xmldoc
.
ToXmlDoc
(
checkXmlDocs
,
Some
[]
)
Construct
.
NewRecdField
true
(
Some
v
)
id
false
thisTy
false
false
[]
attrs
xmlDoc
vis
false
let
TcEnumDecls
(
cenv
:
cenv
)
env
parent
thisTy
enumCases
=
...
...
@@ -2197,7 +2202,9 @@ module TcExceptionDeclarations =
CheckForDuplicateConcreteType
env
(
id
.
idText
+
"Exception"
)
id
.
idRange
CheckForDuplicateConcreteType
env
id
.
idText
id
.
idRange
let
repr
=
TExnFresh
(
Construct
.
MakeRecdFieldsTable
[]
)
let
xmlDoc
=
xmlDoc
.
ToXmlDoc
(
true
,
Some
[]
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xmlDoc
.
ToXmlDoc
(
checkXmlDocs
,
Some
[]
)
Construct
.
NewExn
cpath
id
vis
repr
attrs
xmlDoc
let
TcExnDefnCore_Phase1G_EstablishRepresentation
(
cenv
:
cenv
)
(
env
:
TcEnv
)
parent
(
exnc
:
Entity
)
(
SynExceptionDefnRepr
(_,
SynUnionCase
(
caseType
=
args
),
reprIdOpt
,
_,
_,
m
))
=
...
...
@@ -2531,7 +2538,9 @@ module EstablishTypeDefinitionCores =
let
envForDecls
,
moduleTyAcc
=
MakeInnerEnv
true
envInitial
id
moduleKind
let
moduleTy
=
Construct
.
NewEmptyModuleOrNamespaceType
moduleKind
let
xmlDoc
=
xml
.
ToXmlDoc
(
true
,
Some
[]
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xml
.
ToXmlDoc
(
checkXmlDocs
,
Some
[]
)
let
moduleEntity
=
Construct
.
NewModuleOrNamespace
(
Some
envInitial
.
eCompPath
)
vis
id
xmlDoc
modAttrs
(
MaybeLazy
.
Strict
moduleTy
)
let
innerParent
=
Parent
(
mkLocalModuleRef
moduleEntity
)
let
innerTypeNames
=
TypeNamesInMutRecDecls
cenv
envForDecls
decls
...
...
@@ -2599,7 +2608,9 @@ module EstablishTypeDefinitionCores =
patNames
|
_
->
[]
let
xmlDoc
=
xmlDoc
.
ToXmlDoc
(
true
,
Some
paramNames
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xmlDoc
.
ToXmlDoc
(
checkXmlDocs
,
Some
paramNames
)
Construct
.
NewTycon
(
cpath
,
id
.
idText
,
id
.
idRange
,
vis
,
visOfRepr
,
TyparKind
.
Type
,
LazyWithContext
.
NotLazy
checkedTypars
,
xmlDoc
,
preferPostfix
,
preEstablishedHasDefaultCtor
,
hasSelfReferentialCtor
,
lmodTy
)
...
...
@@ -4485,7 +4496,9 @@ let rec TcSignatureElementNonMutRec (cenv: cenv) parent typeNames endm (env: TcE
let
id
=
ident
(
modName
,
id
.
idRange
)
let
moduleTy
=
Construct
.
NewEmptyModuleOrNamespaceType
moduleKind
let
xmlDoc
=
xml
.
ToXmlDoc
(
true
,
Some
[]
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xml
.
ToXmlDoc
(
checkXmlDocs
,
Some
[]
)
let
moduleEntity
=
Construct
.
NewModuleOrNamespace
(
Some
env
.
eCompPath
)
vis
id
xmlDoc
attribs
(
MaybeLazy
.
Strict
moduleTy
)
let
!
moduleTy
,
_
=
TcModuleOrNamespaceSignatureElementsNonMutRec
cenv
(
Parent
(
mkLocalModuleRef
moduleEntity
))
env
(
id
,
moduleKind
,
moduleDefs
,
m
,
xml
)
...
...
@@ -4591,7 +4604,8 @@ and TcSignatureElements cenv parent endm env xml mutRecNSInfo defs =
cancellable
{
// Ensure the .Deref call in UpdateAccModuleOrNamespaceType succeeds
if
cenv
.
compilingCanonicalFslibModuleType
then
let
xmlDoc
=
xml
.
ToXmlDoc
(
true
,
Some
[]
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xml
.
ToXmlDoc
(
checkXmlDocs
,
Some
[]
)
ensureCcuHasModuleOrNamespaceAtPath
cenv
.
thisCcu
env
.
ePath
env
.
eCompPath
xmlDoc
let
typeNames
=
EstablishTypeDefinitionCores
.
TypeNamesInNonMutRecSigDecls
defs
...
...
@@ -4817,7 +4831,9 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
// Create the new module specification to hold the accumulated results of the type of the module
// Also record this in the environment as the accumulator
let
moduleTy
=
Construct
.
NewEmptyModuleOrNamespaceType
moduleKind
let
xmlDoc
=
xml
.
ToXmlDoc
(
true
,
Some
[]
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xml
.
ToXmlDoc
(
checkXmlDocs
,
Some
[]
)
let
moduleEntity
=
Construct
.
NewModuleOrNamespace
(
Some
env
.
eCompPath
)
vis
id
xmlDoc
modAttrs
(
MaybeLazy
.
Strict
moduleTy
)
// Now typecheck.
...
...
@@ -5063,7 +5079,8 @@ and TcModuleOrNamespaceElements cenv parent endm env xml mutRecNSInfo openDecls0
cancellable
{
// Ensure the deref_nlpath call in UpdateAccModuleOrNamespaceType succeeds
if
cenv
.
compilingCanonicalFslibModuleType
then
let
xmlDoc
=
xml
.
ToXmlDoc
(
true
,
Some
[]
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xml
.
ToXmlDoc
(
checkXmlDocs
,
Some
[]
)
ensureCcuHasModuleOrNamespaceAtPath
cenv
.
thisCcu
env
.
ePath
env
.
eCompPath
xmlDoc
// Collect the type names so we can implicitly add the compilation suffix to module names
...
...
@@ -5289,7 +5306,8 @@ let CheckOneImplFile
isInternalTestSpanStackReferring
,
env
,
rootSigOpt
:
ModuleOrNamespaceType
option
,
synImplFile
)
=
synImplFile
,
diagnosticOptions
)
=
let
(
ParsedImplFileInput
(
fileName
,
isScript
,
qualNameOfFile
,
scopedPragmas
,
_,
implFileFrags
,
isLastCompiland
,
_))
=
synImplFile
let
infoReader
=
InfoReader
(
g
,
amap
)
...
...
@@ -5304,6 +5322,7 @@ let CheckOneImplFile
let
cenv
=
cenv
.
Create
(
g
,
isScript
,
amap
,
thisCcu
,
false
,
Option
.
isSome
rootSigOpt
,
conditionalDefines
,
tcSink
,
(
LightweightTcValForUsingInBuildMethodCall
g
),
isInternalTestSpanStackReferring
,
diagnosticOptions
,
tcPat
=
TcPat
,
tcSimplePats
=
TcSimplePats
,
tcSequenceExpressionEntry
=
TcSequenceExpressionEntry
,
...
...
@@ -5426,7 +5445,7 @@ let CheckOneImplFile
/// Check an entire signature file
let
CheckOneSigFile
(
g
,
amap
,
thisCcu
,
checkForErrors
,
conditionalDefines
,
tcSink
,
isInternalTestSpanStackReferring
)
tcEnv
(
sigFile
:
ParsedSigFileInput
)
=
let
CheckOneSigFile
(
g
,
amap
,
thisCcu
,
checkForErrors
,
conditionalDefines
,
tcSink
,
isInternalTestSpanStackReferring
,
diagnosticOptions
)
tcEnv
(
sigFile
:
ParsedSigFileInput
)
=
cancellable
{
use
_
=
Activity
.
start
"CheckDeclarations.CheckOneSigFile"
...
...
@@ -5438,6 +5457,7 @@ let CheckOneSigFile (g, amap, thisCcu, checkForErrors, conditionalDefines, tcSin
cenv
.
Create
(
g
,
false
,
amap
,
thisCcu
,
true
,
false
,
conditionalDefines
,
tcSink
,
(
LightweightTcValForUsingInBuildMethodCall
g
),
isInternalTestSpanStackReferring
,
diagnosticOptions
,
tcPat
=
TcPat
,
tcSimplePats
=
TcSimplePats
,
tcSequenceExpressionEntry
=
TcSequenceExpressionEntry
,
...
...
src/Compiler/Checking/CheckDeclarations.fsi
浏览文件 @
ffb39091
...
...
@@ -2,6 +2,7 @@
module
internal
FSharp
.
Compiler
.
CheckDeclarations
open
FSharp
.
Compiler
.
Diagnostics
open
Internal
.
Utilities
.
Library
open
FSharp
.
Compiler
.
CheckBasics
open
FSharp
.
Compiler
.
CompilerGlobalState
...
...
@@ -58,11 +59,19 @@ val CheckOneImplFile:
bool
*
TcEnv
*
ModuleOrNamespaceType
option
*
ParsedImplFileInput
->
ParsedImplFileInput
*
FSharpDiagnosticOptions
->
Cancellable
<
TopAttribs
*
CheckedImplFile
*
TcEnv
*
bool
>
val
CheckOneSigFile
:
TcGlobals
*
ImportMap
*
CcuThunk
*
(
unit
->
bool
)
*
ConditionalDefines
option
*
TcResultsSink
*
bool
->
TcGlobals
*
ImportMap
*
CcuThunk
*
(
unit
->
bool
)
*
ConditionalDefines
option
*
TcResultsSink
*
bool
*
FSharpDiagnosticOptions
->
TcEnv
->
ParsedSigFileInput
->
Cancellable
<
TcEnv
*
ModuleOrNamespaceType
*
bool
>
...
...
src/Compiler/Checking/CheckExpressions.fs
浏览文件 @
ffb39091
...
...
@@ -2436,7 +2436,8 @@ module BindingNormalization =
let (NormalizedBindingPat(pat, rhsExpr, valSynData, typars)) =
NormalizeBindingPattern cenv cenv.nameResolver isObjExprBinding env valSynData headPat (NormalizedBindingRhs ([], retInfo, rhsExpr))
let paramNames = Some valSynData.SynValInfo.ArgNames
let xmlDoc = xmlDoc.ToXmlDoc(true, paramNames)
let checkXmlDocs = cenv.diagnosticOptions.CheckXmlDocs
let xmlDoc = xmlDoc.ToXmlDoc(checkXmlDocs, paramNames)
NormalizedBinding(vis, kind, isInline, isMutable, attrs, xmlDoc, typars, valSynData, pat, rhsExpr, mBinding, debugPoint)
//-------------------------------------------------------------------------
...
...
@@ -12089,7 +12090,8 @@ let TcAndPublishValSpec (cenv: cenv, env, containerInfo: ContainerInfo, declKind
| None -> None
| Some valReprInfo -> Some valReprInfo.ArgNames
let xmlDoc = xmlDoc.ToXmlDoc(true, paramNames)
let checkXmlDocs = cenv.diagnosticOptions.CheckXmlDocs
let xmlDoc = xmlDoc.ToXmlDoc(checkXmlDocs, paramNames)
let vspec = MakeAndPublishVal cenv env (altActualParent, true, declKind, ValNotInRecScope, valscheme, attrs, xmlDoc, literalValue, false)
assert(vspec.InlineInfo = inlineFlag)
...
...
src/Compiler/Checking/CheckIncrementalClasses.fs
浏览文件 @
ffb39091
...
...
@@ -4,6 +4,7 @@ module internal FSharp.Compiler.CheckIncrementalClasses
open
System
open
FSharp
.
Compiler
.
Diagnostics
open
Internal
.
Utilities
.
Collections
open
Internal
.
Utilities
.
Library
open
Internal
.
Utilities
.
Library
.
Extras
...
...
@@ -135,7 +136,9 @@ let TcImplicitCtorLhs_Phase2A(cenv: cenv, env, tpenv, tcref: TyconRef, vis, attr
let
varReprInfo
=
InferGenericArityFromTyScheme
prelimTyschemeG
prelimValReprInfo
let
ctorValScheme
=
ValScheme
(
id
,
prelimTyschemeG
,
Some
varReprInfo
,
None
,
Some
memberInfo
,
false
,
ValInline
.
Never
,
NormalVal
,
vis
,
false
,
true
,
false
,
false
)
let
paramNames
=
varReprInfo
.
ArgNames
let
xmlDoc
=
xmlDoc
.
ToXmlDoc
(
true
,
Some
paramNames
)
let
checkXmlDocs
=
cenv
.
diagnosticOptions
.
CheckXmlDocs
let
xmlDoc
=
xmlDoc
.
ToXmlDoc
(
checkXmlDocs
,
Some
paramNames
)
let
ctorVal
=
MakeAndPublishVal
cenv
env
(
Parent
tcref
,
false
,
ModuleOrMemberBinding
,
ValInRecScope
isComplete
,
ctorValScheme
,
attribs
,
xmlDoc
,
None
,
false
)
ctorValScheme
,
ctorVal
...
...
src/Compiler/Driver/ParseAndCheckInputs.fs
浏览文件 @
ffb39091
...
...
@@ -1212,7 +1212,8 @@ let CheckOneInputAux
checkForErrors
,
conditionalDefines
,
tcSink
,
tcConfig
.
internalTestSpanStackReferring
)
tcConfig
.
internalTestSpanStackReferring
,
tcConfig
.
diagnosticsOptions
)
tcState
.
tcsTcSigEnv
file
...
...
@@ -1290,7 +1291,8 @@ let CheckOneInputAux
tcConfig
.
internalTestSpanStackReferring
,
tcState
.
tcsTcImplEnv
,
rootSigOpt
,
file
file
,
tcConfig
.
diagnosticsOptions
)
let
tcState
=
...
...
@@ -1485,7 +1487,8 @@ let CheckMultipleInputsInParallel
tcConfig
.
internalTestSpanStackReferring
,
tcStateForImplFile
.
tcsTcImplEnv
,
Some
rootSig
,
file
file
,
tcConfig
.
diagnosticsOptions
)
|>
Cancellable
.
runWithoutCancellation
...
...
src/Compiler/Facilities/DiagnosticOptions.fs
浏览文件 @
ffb39091
...
...
@@ -31,3 +31,6 @@ type FSharpDiagnosticOptions =
WarnAsError
=
[]
WarnAsWarn
=
[]
}
member
x
.
CheckXmlDocs
=
List
.
contains
3390
x
.
WarnOn
&&
not
(
List
.
contains
3390
x
.
WarnOff
)
src/Compiler/Facilities/DiagnosticOptions.fsi
浏览文件 @
ffb39091
...
...
@@ -22,3 +22,5 @@ type FSharpDiagnosticOptions =
WarnAsWarn
:
int
list
}
static
member
Default
:
FSharpDiagnosticOptions
member
CheckXmlDocs
:
bool
tests/FSharp.Compiler.ComponentTests/Language/XmlComments.fs
浏览文件 @
ffb39091
...
...
@@ -49,6 +49,17 @@ module M =
"This XML comment is invalid: unknown parameter 'b'"
);
]
[<
Fact
>]
let
``diagnostic is not reported when disabled``
()
=
Fsx
"""
/// <summary> F </summary>
/// <param name="
x
"> the parameter </param>
let f a = a
"""
|>
compile
|>
shouldSucceed
|>
withDiagnostics
[]
[<
Fact
>]
let
``invalid parameter name is reported``
()
=
Fsx
"""
...
...
tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected
浏览文件 @
ffb39091
...
...
@@ -2386,10 +2386,12 @@ FSharp.Compiler.Diagnostics.FSharpDiagnosticKind: Int32 Tag
FSharp.Compiler.Diagnostics.FSharpDiagnosticKind: Int32 get_Tag()
FSharp.Compiler.Diagnostics.FSharpDiagnosticKind: System.String ToString()
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean CheckXmlDocs
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean Equals(FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions)
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean Equals(System.Object)
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean Equals(System.Object, System.Collections.IEqualityComparer)
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean GlobalWarnAsError
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean get_CheckXmlDocs()
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean get_GlobalWarnAsError()
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions Default
FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions get_Default()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录