Skip to content

Commit b1d5c7f

Browse files
fix: use string overload of Contains for netstandard2.0 compatibility
Replace char literal '.' with string literal "." in String.Contains calls at lines 1664 and 8161, as the char overload is not available in netstandard2.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 82a9d85 commit b1d5c7f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/ProvidedTypes.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,11 +1661,11 @@ and ProvidedTypeDefinition(isTgt: bool, container:TypeContainer, className: stri
16611661
let sc = if ignoreCase then StringComparison.OrdinalIgnoreCase else StringComparison.Ordinal
16621662
this.GetInterfaces()
16631663
|> Array.tryFind (fun t ->
1664-
if name.Contains('.') then String.Equals(t.FullName, name, sc)
1664+
if name.Contains(".") then String.Equals(t.FullName, name, sc)
16651665
else String.Equals(t.Name, name, sc))
16661666
|> Option.toObj
16671667

1668-
override __.GetInterfaces() = getInterfaces()
1668+
override __.GetInterfaces() = getInterfaces()
16691669

16701670

16711671
override __.MakeArrayType() = ProvidedTypeSymbol(ProvidedTypeSymbolKind.SDArray, [this], typeBuilder) :> Type
@@ -8158,7 +8158,7 @@ namespace ProviderImplementation.ProvidedTypes
81588158
let sc = if ignoreCase then StringComparison.OrdinalIgnoreCase else StringComparison.Ordinal
81598159
this.GetInterfaces()
81608160
|> Array.tryFind (fun t ->
8161-
if name.Contains('.') then String.Equals(t.FullName, name, sc)
8161+
if name.Contains(".") then String.Equals(t.FullName, name, sc)
81628162
else String.Equals(t.Name, name, sc))
81638163
|> Option.toObj
81648164
override this.GetElementType() = notRequired this "GetElementType" inp.Name

0 commit comments

Comments
 (0)