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

Commit5657759

Browse files
fix QA tests
1 parentc9a64b2 commit5657759

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

‎src/fsharp/FSComp.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1334,4 +1334,4 @@ tcGlobalsSystemTypeNotFound,"The system type '%s' was required but no referenced
13341334
3213,typrelMemberHasMultiplePossibleDispatchSlots,"The member '%s' matches multiple overloads of the same method.\nPlease restrict it to one of the following:%s."
13351335
3214,methodIsNotStatic,"Method or object constructor '%s' is not static"
13361336
3215,expressionHasNoName,"This expression does not have a name."
1337-
3216,chkNoFirstClassNameOf,"First-class uses of the 'nameof' operator is not permitted"
1337+
3216,chkNoFirstClassNameOf,"First-class uses of the 'nameof' operator is not permitted."

‎src/fsharp/TypeChecker.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8269,7 +8269,7 @@ and TcFunctionApplicationThen cenv overallTy env tpenv mExprAndArg expr exprty (
82698269
// generate fake `range` for the constant the `nameof(..)` we are substituting
82708270
let constRange = mkRange r.FileName r.Start (mkPos r.StartLine (r.StartColumn + argIdent.idText.Length + 2)) // `2` are for quotes
82718271
TcDelayed cenv overallTy env tpenv mExprAndArg (ApplicableExpr(cenv, Expr.Const(Const.String(argIdent.idText), constRange, cenv.g.string_ty), true)) cenv.g.string_ty ExprAtomicFlag.Atomic delayed
8272-
| _ -> error (Error(FSComp.SR.expressionHasNoName(),synArg.Range))
8272+
| _ -> error (Error(FSComp.SR.expressionHasNoName(),expr.Range))
82738273
| _ ->
82748274
// Notice the special case 'seq { ... }'. In this case 'seq' is actually a function in the F# library.
82758275
// Set a flag in the syntax tree to say we noticed a leading 'seq'

‎tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfAdditionExpr.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Conformance #DataExpressions
22
// Verify that nameof doesn't work on const string
3-
//<Expectsx x-first x-last">FS3199" span="(5,9)" status="error">This expression does not have a name.</Expects>
3+
//<Expectsx x-first x-last">FS3215" span="(5,9)" status="error">This expression does not have a name.</Expects>
44

55
letx= nameof(1+2)
66

‎tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfAppliedFunction.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Conformance #DataExpressions
22
// Verify that nameof doesn't work on applied functions
3-
//<Expectsx x-first x-last">FS3199" span="(6,9)" status="error">This expression does not have a name.</Expects>
3+
//<Expectsx x-first x-last">FS3215" span="(6,9)" status="error">This expression does not have a name.</Expects>
44

55
letf()=1
66
letx= nameof(f())

‎tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfAsAFunction.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Conformance #DataExpressions
22
// Verify that nameof can't be used as a function.
3-
//<Expectsx x-first x-last">FS3199" span="(5,9)" status="error">This expression does not have a name.</Expects>
3+
//<Expectsx x-first x-last">FS3216" span="(5,9)" status="error">First-class uses of the 'nameof' operator is not permitted</Expects>
44

55
letf= nameof
66

‎tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfDictLookup.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Conformance #DataExpressions
22
// Verify that nameof doesn't work on dictionary lookup
3-
//<Expectsx x-first x-last">FS3199" span="(6,9)" status="error">This expression does not have a name.</Expects>
3+
//<Expectsx x-first x-last">FS3215" span="(6,9)" status="error">This expression does not have a name.</Expects>
44

55
letdict=new System.Collections.Generic.Dictionary<int,string>()
66
letb= nameof(dict.[2])

‎tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfIntConst.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Conformance #DataExpressions
22
// Verify that nameof doesn't work on const int
3-
//<Expectsx x-first x-last">FS3199" span="(5,9)" status="error">This expression does not have a name.</Expects>
3+
//<Expectsx x-first x-last">FS3215" span="(5,9)" status="error">This expression does not have a name.</Expects>
44

55
letx= nameof1
66

‎tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfIntegerAppliedFunction.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Conformance #DataExpressions
22
// Verify that nameof doesn't work on applied functions
3-
//<Expectsx x-first x-last">FS3199" span="(6,9)" status="error">This expression does not have a name.</Expects>
3+
//<Expectsx x-first x-last">FS3215" span="(6,9)" status="error">This expression does not have a name.</Expects>
44

55
letf x=1* x
66
letx= nameof(f2)

‎tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfParameterAppliedFunction.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Conformance #DataExpressions
22
// Verify that nameof doesn't work on applied functions
3-
//<Expectsx x-first x-last">FS3199" span="(7,9)" status="error">This expression does not have a name.</Expects>
3+
//<Expectsx x-first x-last">FS3215" span="(7,9)" status="error">This expression does not have a name.</Expects>
44

55
letf x y= x y
66
letz x=1* x

‎tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfPartiallyAppliedFunction.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Conformance #DataExpressions
22
// Verify that nameof doesn't work on partially applied functions
3-
//<Expectsx x-first x-last">FS3199" span="(6,9)" status="error">This expression does not have a name.</Expects>
3+
//<Expectsx x-first x-last">FS3215" span="(6,9)" status="error">This expression does not have a name.</Expects>
44

55
letf x y= y* x
66
letx= nameof(f2)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp