Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81a8ead

Browse files
committed
Minor tweak to the PR and add some extra tests
1 parent49b71a4 commit81a8ead

File tree

4 files changed

+32
-6
lines changed

4 files changed

+32
-6
lines changed

‎src/fsharp/fsc.fs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -994,12 +994,12 @@ module AttributeHelpers =
994994
|_-> None
995995

996996
// Try to find an AssemblyVersion attribute
997-
letTryFindVersionAttribute tcGlobals attrib attribs=
997+
letTryFindVersionAttribute tcGlobals attribattribNameattribs=
998998
match TryFindStringAttribute tcGlobals attrib attribswith
999999
| Some versionString->
10001000
try Some(IL.parseILVersion versionString)
10011001
with e->
1002-
warning(Error(FSComp.SR.fscBadAssemblyVersion(attrib, versionString),Range.rangeStartup));
1002+
warning(Error(FSComp.SR.fscBadAssemblyVersion(attribName, versionString),Range.rangeStartup));
10031003
None
10041004
|_-> None
10051005

@@ -1183,12 +1183,12 @@ module MainModuleBuilder =
11831183
|_->[]
11841184

11851185
letfileVersion=
1186-
match AttributeHelpers.TryFindVersionAttribute tcGlobals"System.Reflection.AssemblyFileVersionAttribute" topAttrs.assemblyAttrswith
1186+
match AttributeHelpers.TryFindVersionAttribute tcGlobals"System.Reflection.AssemblyFileVersionAttribute""AssemblyFileVersionAttribute"topAttrs.assemblyAttrswith
11871187
| Some v-> v
11881188
| None-> assemblyVersion
11891189

11901190
letproductVersion=
1191-
match AttributeHelpers.TryFindVersionAttribute tcGlobals"System.Reflection.AssemblyInformationalVersionAttribute" topAttrs.assemblyAttrswith
1191+
match AttributeHelpers.TryFindVersionAttribute tcGlobals"System.Reflection.AssemblyInformationalVersionAttribute""AssemblyInformationalVersionAttribute"topAttrs.assemblyAttrswith
11921192
| Some v-> v
11931193
| None-> assemblyVersion
11941194

@@ -1937,7 +1937,7 @@ let main1(tcGlobals,tcImports : TcImports,frameworkTcImports,generatedCcu,typedA
19371937

19381938
// Try to find an AssemblyVersion attribute
19391939
letassemVerFromAttrib=
1940-
match AttributeHelpers.TryFindVersionAttribute tcGlobals"System.Reflection.AssemblyVersionAttribute" topAttrs.assemblyAttrswith
1940+
match AttributeHelpers.TryFindVersionAttribute tcGlobals"System.Reflection.AssemblyVersionAttribute""AssemblyVersionAttribute"topAttrs.assemblyAttrswith
19411941
| Some v->
19421942
match tcConfig.versionwith
19431943
| VersionNone-> Some v
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// #Regression #Conformance #DeclarationElements #Attributes
2+
//<Expects id="FS2003" status="warning">An AssemblyInformationalVersionAttribute specified version '6\.5\.4\.3\.2', but this value is invalid and has been ignored</Expects>
3+
//<Expects id="FS2003" status="warning">An AssemblyFileVersionAttribute specified version '9\.8\.7\.6\.5', but this value is invalid and has been ignored</Expects>
4+
5+
[<assembly:System.Reflection.AssemblyVersion("1.2.3.4")>]
6+
[<assembly:System.Reflection.AssemblyInformationalVersion("6.5.4.3.2")>]
7+
[<assembly:System.Reflection.AssemblyFileVersion("9.8.7.6.5")>]
8+
do
9+
()
10+
11+
letasm= System.Reflection.Assembly.GetExecutingAssembly().GetName()
12+
13+
exit0
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// #Regression #Conformance #DeclarationElements #Attributes
2+
//<Expects id="FS2003" status="warning">An AssemblyInformationalVersionAttribute specified version '6\.5\.\*\.3', but this value is invalid and has been ignored</Expects>
3+
//<Expects id="FS2003" status="warning">An AssemblyFileVersionAttribute specified version '9\.8\.\*\.6', but this value is invalid and has been ignored</Expects>
4+
5+
[<assembly:System.Reflection.AssemblyVersion("1.2.3.4")>]
6+
[<assembly:System.Reflection.AssemblyInformationalVersion("6.5.*.3")>]
7+
[<assembly:System.Reflection.AssemblyFileVersionAttribute("9.8.*.6")>]
8+
do
9+
()
10+
11+
exit0

‎tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/env.lst‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@
1919
SOURCE=AssemblyVersion03.fs# AssemblyVersion03.fs
2020
SOURCE=AssemblyVersion04.fs# AssemblyVersion04.fs
2121
SOURCE=W_AssemblyVersion01.fs SCFLAGS="--test:ErrorRanges"# W_AssemblyVersion01.fs
22-
SOURCE=W_AssemblyVersion02.fs SCFLAGS="--test:ErrorRanges"# W_AssemblyVersion02.fs
22+
SOURCE=W_AssemblyVersion02.fs SCFLAGS="--test:ErrorRanges"# W_AssemblyVersion02.fs
23+
SOURCE=X_AssemblyVersion01.fs SCFLAGS="--test:ErrorRanges"# X_AssemblyVersion01.fs
24+
SOURCE=X_AssemblyVersion02.fs SCFLAGS="--test:ErrorRanges"# X_AssemblyVersion02.fs

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp