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

Commitc5d5871

Browse files
authored
Merge pull requestdotnet#4823 from Microsoft/merges/master-to-dev15.8
Merge master to dev15.8
2 parentse518b1f +8c1c159 commitc5d5871

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

‎src/fsharp/FSharp.Core/control.fs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,9 +2011,8 @@ namespace Microsoft.FSharp.Control
20112011
// If it isn't, then create it, and go back to the start to
20122012
// check arrivals again.
20132013
match pulsewith
2014-
|null->
2015-
if timeout>=0|| cancellationSupportedthen
2016-
ensurePulse()|> ignore
2014+
|nullwhen timeout>=0|| cancellationSupported->
2015+
ensurePulse()|> ignore
20172016
return! processFirstArrival()
20182017
|_->
20192018
// Wait until we have been notified about a message. When that happens, rescan the arrivals

‎src/fsharp/LowerCallsAndSeqs.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ let LowerSeqExpr g amap overallExpr =
303303
(mkLambdaNoType g m enumv
304304
(mkCallSeqGenerated g m genElemTy(mkUnitDelayLambda g m(callNonOverloadedMethod g amap m"MoveNext" inpEnumTy[enume]))
305305
(mkInvisibleLet m v(callNonOverloadedMethod g amap m"get_Current" inpEnumTy[enume])
306-
body))))
306+
(mkCoerceIfNeeded g(mkSeqTy g genElemTy)(tyOfExpr gbody) body)))))
307307

308308
| SeqTryFinally(e1,compensation,m)->
309309
// printfn "found Seq.try/finally"

‎src/fsharp/TypeChecker.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17172,13 +17172,13 @@ let TypeCheckOneImplFile
1717217172
topAttrs.assemblyAttrs |> List.iter (function
1717317173
| Attrib(tref, _, [ AttribExpr(Expr.Const (Const.String(version), range, _), _) ] , _, _, _, _) ->
1717417174
let attrName = tref.CompiledRepresentationForNamedType.FullName
17175-
let isValid =
17175+
let isValid() =
1717617176
try IL.parseILVersion version |> ignore; true
1717717177
with _ -> false
1717817178
match attrName with
1717917179
| "System.Reflection.AssemblyInformationalVersionAttribute"
1718017180
| "System.Reflection.AssemblyFileVersionAttribute" //TODO compile error like c# compiler?
17181-
| "System.Reflection.AssemblyVersionAttribute" when not isValid ->
17181+
| "System.Reflection.AssemblyVersionAttribute" when not(isValid()) ->
1718217182
warning(Error(FSComp.SR.fscBadAssemblyVersion(attrName, version), range))
1718317183
| _ -> ()
1718417184
| _ -> ())

‎tests/fsharp/core/seq/test.fsx‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,9 +712,24 @@ module InfiniteSequenceExpressionsExecuteWithFiniteResources =
712712
yield factorial x
713713
]
714714

715-
for fin factorialsdo printf"%i" f
715+
check"vlklmkkl" factorials[1;1;2;6;24;120;720;5040;40320;362880;3628800]
716716
TestRecFuncInSeq()
717717

718+
moduleTestCollectOnStructSeq=
719+
openSystem
720+
721+
[<Struct>]
722+
typeS=
723+
interface System.Collections.Generic.IEnumerable<int>with
724+
memberx.GetEnumerator()=(seq{yield1;yield2}).GetEnumerator()
725+
interface System.Collections.IEnumerablewith
726+
memberx.GetEnumerator()=(seq{yield1;yield2}:> System.Collections.IEnumerable).GetEnumerator()
727+
728+
letiterate(x:S)=
729+
seq{yield! Seq.collect(fun _-> x)[1]}
730+
731+
check"ccekecnwe"(iterate(Unchecked.defaultof<S>)|> Seq.length)2
732+
718733
(*---------------------------------------------------------------------------
719734
!* wrap up
720735
*---------------------------------------------------------------------------*)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp