Skip to content

Commit 93a1a0d

Browse files
authored
Merge pull request #9856 from dotnet/merges/master-to-feature/string-interp
Merge master to feature/string-interp
2 parents b6fbc74 + 379aff6 commit 93a1a0d

31 files changed

+2621
-735
lines changed

src/absil/ilnativeres.fs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,10 @@ type VersionHelper() =
279279
/// <summary>
280280
/// Parses a version string of the form "major [ '.' minor [ '.' build [ '.' revision ] ] ]".
281281
/// </summary>
282+
///
282283
/// <param name="s">The version string to parse.</param>
283284
/// <param name="version">If parsing succeeds, the parsed version. Otherwise a version that represents as much of the input as could be parsed successfully.</param>
285+
///
284286
/// <returns>True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise.</returns>
285287
static member TryParse(s: string, [<Out>] version: byref<Version>) =
286288
VersionHelper.TryParse (s, false, UInt16.MaxValue, true, ref version)
@@ -289,12 +291,14 @@ type VersionHelper() =
289291
/// Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]"
290292
/// as accepted by System.Reflection.AssemblyVersionAttribute.
291293
/// </summary>
294+
///
292295
/// <param name="s">The version string to parse.</param>
293296
/// <param name="allowWildcard">Indicates whether or not a wildcard is accepted as the terminal component.</param>
294297
/// <param name="version">
295298
/// If parsing succeeded, the parsed version. Otherwise a version instance with all parts set to zero.
296299
/// If <paramref name="s"/> contains * the version build and/or revision numbers are set to <see cref="ushort.MaxValue"/>.
297300
/// </param>
301+
///
298302
/// <returns>True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise.</returns>
299303
300304
static member TryParseAssemblyVersion (s: string, allowWildcard: bool, [<Out>] version: byref<Version>) =
@@ -306,6 +310,7 @@ type VersionHelper() =
306310
/// Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]"
307311
/// as accepted by System.Reflection.AssemblyVersionAttribute.
308312
/// </summary>
313+
///
309314
/// <param name="s">The version string to parse.</param>
310315
/// <param name="allowWildcard">Indicates whether or not we're parsing an assembly version string. If so, wildcards are accepted and each component must be less than 65535.</param>
311316
/// <param name="maxValue">The maximum value that a version component may have.</param>
@@ -314,6 +319,7 @@ type VersionHelper() =
314319
/// If parsing succeeded, the parsed version. When <paramref name="allowPartialParse"/> is true a version with values up to the first invalid character set. Otherwise a version with all parts set to zero.
315320
/// If <paramref name="s"/> contains * and wildcard is allowed the version build and/or revision numbers are set to <see cref="ushort.MaxValue"/>.
316321
/// </param>
322+
///
317323
/// <returns>True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise.</returns>
318324
static member private TryParse(s: string, allowWildcard: bool, maxValue: uint16, allowPartialParse: bool, [<Out>] version: byref<Version>) =
319325
Debug.Assert (not allowWildcard || maxValue < UInt16.MaxValue)

src/fsharp/FSharp.Core/Nullable.fsi

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,163 +117,204 @@ module Nullable =
117117
/// primitive numeric types. The operation requires an appropriate
118118
/// static conversion method on the input type.</summary>
119119
/// <param name="value">The input value.</param>
120+
///
120121
/// <returns>The converted byte</returns>
121122
[<CompiledName("ToByte")>]
122123
val inline byte : value:Nullable< ^T > -> Nullable<byte> when ^T : (static member op_Explicit : ^T -> byte) and default ^T : int
123124

124125
/// <summary>Converts the argument to byte. This is a direct conversion for all
125126
/// primitive numeric types. The operation requires an appropriate
126127
/// static conversion method on the input type.</summary>
128+
///
127129
/// <param name="value">The input value.</param>
130+
///
128131
/// <returns>The converted byte</returns>
129132
[<CompiledName("ToUInt8")>]
130133
val inline uint8 : value:Nullable< ^T > -> Nullable<uint8> when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int
131134

132135
/// <summary>Converts the argument to signed byte. This is a direct conversion for all
133136
/// primitive numeric types. The operation requires an appropriate
134137
/// static conversion method on the input type.</summary>
138+
///
135139
/// <param name="value">The input value.</param>
140+
///
136141
/// <returns>The converted sbyte</returns>
137142
[<CompiledName("ToSByte")>]
138143
val inline sbyte : value:Nullable< ^T > -> Nullable<sbyte> when ^T : (static member op_Explicit : ^T -> sbyte) and default ^T : int
139144

140145
/// <summary>Converts the argument to signed byte. This is a direct conversion for all
141146
/// primitive numeric types. The operation requires an appropriate
142147
/// static conversion method on the input type.</summary>
148+
///
143149
/// <param name="value">The input value.</param>
150+
///
144151
/// <returns>The converted sbyte</returns>
145152
[<CompiledName("ToInt8")>]
146153
val inline int8 : value:Nullable< ^T > -> Nullable<int8> when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int
147154

148155
/// <summary>Converts the argument to signed 16-bit integer. This is a direct conversion for all
149156
/// primitive numeric types. The operation requires an appropriate
150157
/// static conversion method on the input type.</summary>
158+
///
151159
/// <param name="value">The input value.</param>
160+
///
152161
/// <returns>The converted int16</returns>
153162
[<CompiledName("ToInt16")>]
154163
val inline int16 : value:Nullable< ^T > -> Nullable<int16> when ^T : (static member op_Explicit : ^T -> int16) and default ^T : int
155164

156165
/// <summary>Converts the argument to unsigned 16-bit integer. This is a direct conversion for all
157166
/// primitive numeric types. The operation requires an appropriate
158167
/// static conversion method on the input type.</summary>
168+
///
159169
/// <param name="value">The input value.</param>
170+
///
160171
/// <returns>The converted uint16</returns>
161172
[<CompiledName("ToUInt16")>]
162173
val inline uint16 : value:Nullable< ^T > -> Nullable<uint16> when ^T : (static member op_Explicit : ^T -> uint16) and default ^T : int
163174

164175
/// <summary>Converts the argument to signed 32-bit integer. This is a direct conversion for all
165176
/// primitive numeric types. The operation requires an appropriate
166177
/// static conversion method on the input type.</summary>
178+
///
167179
/// <param name="value">The input value.</param>
180+
///
168181
/// <returns>The converted int</returns>
169182
[<CompiledName("ToInt")>]
170183
val inline int : value:Nullable< ^T > -> Nullable<int> when ^T : (static member op_Explicit : ^T -> int) and default ^T : int
171184

172185
/// <summary>Converts the argument to an unsigned 32-bit integer. This is a direct conversion for all
173186
/// primitive numeric types. The operation requires an appropriate
174187
/// static conversion method on the input type.</summary>
188+
///
175189
/// <param name="value">The input value.</param>
190+
///
176191
/// <returns>The converted unsigned integer</returns>
177192
[<CompiledName("ToUInt")>]
178193
val inline uint: value: Nullable< ^T > -> Nullable<uint> when ^T :(static member op_Explicit: ^T -> uint) and default ^T : uint
179194

180195
/// <summary>Converts the argument to a particular enum type.</summary>
196+
///
181197
/// <param name="value">The input value.</param>
198+
///
182199
/// <returns>The converted enum type.</returns>
183200
[<CompiledName("ToEnum")>]
184201
val inline enum : value:Nullable< int32 > -> Nullable< ^U > when ^U : enum<int32>
185202

186203
/// <summary>Converts the argument to signed 32-bit integer. This is a direct conversion for all
187204
/// primitive numeric types. The operation requires an appropriate
188205
/// static conversion method on the input type.</summary>
206+
///
189207
/// <param name="value">The input value.</param>
208+
///
190209
/// <returns>The converted int32</returns>
191210
[<CompiledName("ToInt32")>]
192211
val inline int32 : value:Nullable< ^T > -> Nullable<int32> when ^T : (static member op_Explicit : ^T -> int32) and default ^T : int
193212

194213
/// <summary>Converts the argument to unsigned 32-bit integer. This is a direct conversion for all
195214
/// primitive numeric types. The operation requires an appropriate
196215
/// static conversion method on the input type.</summary>
216+
///
197217
/// <param name="value">The input value.</param>
218+
///
198219
/// <returns>The converted uint32</returns>
199220
[<CompiledName("ToUInt32")>]
200221
val inline uint32 : value:Nullable< ^T > -> Nullable<uint32> when ^T : (static member op_Explicit : ^T -> uint32) and default ^T : int
201222

202223
/// <summary>Converts the argument to signed 64-bit integer. This is a direct conversion for all
203224
/// primitive numeric types. The operation requires an appropriate
204225
/// static conversion method on the input type.</summary>
226+
///
205227
/// <param name="value">The input value.</param>
228+
///
206229
/// <returns>The converted int64</returns>
207230
[<CompiledName("ToInt64")>]
208231
val inline int64 : value:Nullable< ^T > -> Nullable<int64> when ^T : (static member op_Explicit : ^T -> int64) and default ^T : int
209232

210233
/// <summary>Converts the argument to unsigned 64-bit integer. This is a direct conversion for all
211234
/// primitive numeric types. The operation requires an appropriate
212235
/// static conversion method on the input type.</summary>
236+
///
213237
/// <param name="value">The input value.</param>
238+
///
214239
/// <returns>The converted uint64</returns>
215240
[<CompiledName("ToUInt64")>]
216241
val inline uint64 : value:Nullable< ^T > -> Nullable<uint64> when ^T : (static member op_Explicit : ^T -> uint64) and default ^T : int
217242

218243
/// <summary>Converts the argument to 32-bit float. This is a direct conversion for all
219244
/// primitive numeric types. The operation requires an appropriate
220245
/// static conversion method on the input type.</summary>
246+
///
221247
/// <param name="value">The input value.</param>
248+
///
222249
/// <returns>The converted float32</returns>
223250
[<CompiledName("ToFloat32")>]
224251
val inline float32 : value:Nullable< ^T > -> Nullable<float32> when ^T : (static member op_Explicit : ^T -> float32) and default ^T : int
225252

226253
/// <summary>Converts the argument to 64-bit float. This is a direct conversion for all
227254
/// primitive numeric types. The operation requires an appropriate
228255
/// static conversion method on the input type.</summary>
256+
///
229257
/// <param name="value">The input value.</param>
258+
///
230259
/// <returns>The converted float</returns>
231260
[<CompiledName("ToFloat")>]
232261
val inline float : value:Nullable< ^T > -> Nullable<float> when ^T : (static member op_Explicit : ^T -> float) and default ^T : int
233262

234263
/// <summary>Converts the argument to 32-bit float. This is a direct conversion for all
235264
/// primitive numeric types. The operation requires an appropriate
236265
/// static conversion method on the input type.</summary>
266+
///
237267
/// <param name="value">The input value.</param>
268+
///
238269
/// <returns>The converted float32</returns>
239270
[<CompiledName("ToSingle")>]
240271
val inline single : value:Nullable< ^T > -> Nullable<single> when ^T : (static member op_Explicit : ^T -> single) and default ^T : int
241272

242273
/// <summary>Converts the argument to 64-bit float. This is a direct conversion for all
243274
/// primitive numeric types. The operation requires an appropriate
244275
/// static conversion method on the input type.</summary>
276+
///
245277
/// <param name="value">The input value.</param>
278+
///
246279
/// <returns>The converted float</returns>
247280
[<CompiledName("ToDouble")>]
248281
val inline double : value:Nullable< ^T > -> Nullable<double> when ^T : (static member op_Explicit : ^T -> double) and default ^T : int
249282

250283
/// <summary>Converts the argument to signed native integer. This is a direct conversion for all
251284
/// primitive numeric types. Otherwise the operation requires an appropriate
252285
/// static conversion method on the input type.</summary>
286+
///
253287
/// <param name="value">The input value.</param>
288+
///
254289
/// <returns>The converted nativeint</returns>
255290
[<CompiledName("ToIntPtr")>]
256291
val inline nativeint : value:Nullable< ^T > -> Nullable<nativeint> when ^T : (static member op_Explicit : ^T -> nativeint) and default ^T : int
257292

258293
/// <summary>Converts the argument to unsigned native integer using a direct conversion for all
259294
/// primitive numeric types. Otherwise the operation requires an appropriate
260295
/// static conversion method on the input type.</summary>
296+
///
261297
/// <param name="value">The input value.</param>
298+
///
262299
/// <returns>The converted unativeint</returns>
263300
[<CompiledName("ToUIntPtr")>]
264301
val inline unativeint : value:Nullable< ^T > -> Nullable<unativeint> when ^T : (static member op_Explicit : ^T -> unativeint) and default ^T : int
265302

266303
/// <summary>Converts the argument to System.Decimal using a direct conversion for all
267304
/// primitive numeric types. The operation requires an appropriate
268305
/// static conversion method on the input type.</summary>
306+
///
269307
/// <param name="value">The input value.</param>
308+
///
270309
/// <returns>The converted decimal.</returns>
271310
[<CompiledName("ToDecimal")>]
272311
val inline decimal : value:Nullable< ^T > -> Nullable<decimal> when ^T : (static member op_Explicit : ^T -> decimal) and default ^T : int
273312

274313
/// <summary>Converts the argument to character. Numeric inputs are converted according to the UTF-16
275314
/// encoding for characters. The operation requires an appropriate static conversion method on the input type.</summary>
315+
///
276316
/// <param name="value">The input value.</param>
317+
///
277318
/// <returns>The converted char.</returns>
278319
[<CompiledName("ToChar")>]
279320
val inline char : value:Nullable< ^T > -> Nullable<char> when ^T : (static member op_Explicit : ^T -> char) and default ^T : int

0 commit comments

Comments
 (0)