未验证 提交 f2b0862d 编写于 作者: D dotnet bot 提交者: GitHub

Merge pull request #13073 from dotnet/merges/main-to-release/dev17.3

Merge main to release/dev17.3
......@@ -2235,10 +2235,13 @@ let TcArrayOrListComputedExpression (cenv: cenv) env (overallTy: OverallTy) tpen
elif nelems > 0 && List.forall (function SynExpr.Const (SynConst.Byte _, _) -> true | _ -> false) elems
then SynExpr.Const (SynConst.Bytes (Array.ofList (List.map (function SynExpr.Const (SynConst.Byte x, _) -> x | _ -> failwith "unreachable") elems), SynByteStringKind.Regular, m), m)
else SynExpr.ArrayOrList (isArray, elems, m)
else
if elems.Length > 500 then
error(Error(FSComp.SR.tcListLiteralMaxSize(), m))
SynExpr.ArrayOrList (isArray, elems, m)
else
if cenv.g.langVersion.SupportsFeature(LanguageFeature.ReallyLongLists) then
SynExpr.ArrayOrList (isArray, elems, m)
else
if elems.Length > 500 then
error(Error(FSComp.SR.tcListLiteralMaxSize(), m))
SynExpr.ArrayOrList (isArray, elems, m)
TcExprUndelayed cenv overallTy env tpenv replacementExpr
| _ ->
......
......@@ -1553,6 +1553,7 @@ featureWitnessPassing,"witness passing for trait constraints in F# quotations"
featureAdditionalImplicitConversions,"additional type-directed conversions"
featureStructActivePattern,"struct representation for active patterns"
featureRelaxWhitespace2,"whitespace relaxation v2"
featureReallyLongList,"list literals of any size"
3353,fsiInvalidDirective,"Invalid directive '#%s %s'"
3354,tcNotAFunctionButIndexerNamedIndexingNotYetEnabled,"This value supports indexing, e.g. '%s.[index]'. The syntax '%s[index]' requires /langversion:preview. See https://aka.ms/fsharp-index-notation."
3354,tcNotAFunctionButIndexerIndexingNotYetEnabled,"This expression supports indexing, e.g. 'expr.[index]'. The syntax 'expr[index]' requires /langversion:preview. See https://aka.ms/fsharp-index-notation."
......
......@@ -47,6 +47,7 @@ type LanguageFeature =
| MLCompatRevisions
| BetterExceptionPrinting
| DelegateTypeNameResolutionFix
| ReallyLongLists
/// LanguageVersion management
type LanguageVersion (versionText) =
......@@ -104,6 +105,7 @@ type LanguageVersion (versionText) =
LanguageFeature.FromEndSlicing, previewVersion
LanguageFeature.MLCompatRevisions,previewVersion
LanguageFeature.BetterExceptionPrinting,previewVersion
LanguageFeature.ReallyLongLists, previewVersion
]
static let defaultLanguageVersion = LanguageVersion("default")
......@@ -202,6 +204,7 @@ type LanguageVersion (versionText) =
| LanguageFeature.MLCompatRevisions -> FSComp.SR.featureMLCompatRevisions()
| LanguageFeature.BetterExceptionPrinting -> FSComp.SR.featureBetterExceptionPrinting()
| LanguageFeature.DelegateTypeNameResolutionFix -> FSComp.SR.featureDelegateTypeNameResolutionFix()
| LanguageFeature.ReallyLongLists -> FSComp.SR.featureReallyLongList()
/// Get a version string associated with the given feature.
member _.GetFeatureVersionString feature =
......
......@@ -37,6 +37,7 @@ type LanguageFeature =
| MLCompatRevisions
| BetterExceptionPrinting
| DelegateTypeNameResolutionFix
| ReallyLongLists
/// LanguageVersion management
type LanguageVersion =
......
......@@ -4364,7 +4364,15 @@ let rec ResolvePartialLongIdentPrim (ncenv: NameResolver) (nenv: NameResolutionE
|> Seq.collect (InfosForTyconConstructors ncenv m ad)
|> Seq.toList
unqualifiedItems @ activePatternItems @ moduleAndNamespaceItems @ tycons @ constructors
let typeVars =
if nenv.eTypars.IsEmpty then
[]
else
nenv.eTypars
|> Seq.map (fun kvp -> Item.TypeVar (kvp.Key, kvp.Value))
|> Seq.toList
unqualifiedItems @ activePatternItems @ moduleAndNamespaceItems @ tycons @ constructors @ typeVars
| id :: rest ->
......
......@@ -650,12 +650,13 @@ module PrintTypes =
| _, _ -> squareAngleL (sepListL (rightL (tagPunctuation ";")) ((match kind with TyparKind.Type -> [] | TyparKind.Measure -> [wordL (tagText "Measure")]) @ List.map (layoutAttrib denv) attrs)) ^^ restL
and layoutTyparRef denv (typar: Typar) =
wordL
(tagTypeParameter
(sprintf "%s%s%s"
(if denv.showConstraintTyparAnnotations then prefixOfStaticReq typar.StaticReq else "'")
(if denv.showImperativeTyparAnnotations then prefixOfRigidTypar typar else "")
typar.DisplayName))
tagTypeParameter
(sprintf "%s%s%s"
(if denv.showConstraintTyparAnnotations then prefixOfStaticReq typar.StaticReq else "'")
(if denv.showImperativeTyparAnnotations then prefixOfRigidTypar typar else "")
typar.DisplayName)
|> mkNav typar.Range
|> wordL
/// Layout a single type parameter declaration, taking TypeSimplificationInfo into account
/// There are several printing-cases for a typar:
......@@ -2426,6 +2427,8 @@ let prettyLayoutOfType denv x = x |> PrintTypes.prettyLayoutOfType denv
let prettyLayoutOfTypeNoCx denv x = x |> PrintTypes.prettyLayoutOfTypeNoConstraints denv
let prettyLayoutOfTypar denv x = x |> PrintTypes.layoutTyparRef denv
let prettyStringOfTy denv x = x |> PrintTypes.prettyLayoutOfType denv |> showL
let prettyStringOfTyNoCx denv x = x |> PrintTypes.prettyLayoutOfTypeNoConstraints denv |> showL
......
......@@ -87,6 +87,8 @@ val prettyLayoutOfType: denv:DisplayEnv -> x:TType -> Layout
val prettyLayoutOfTypeNoCx: denv:DisplayEnv -> x:TType -> Layout
val prettyLayoutOfTypar: denv:DisplayEnv -> x:Typar -> Layout
val prettyStringOfTy: denv:DisplayEnv -> x:TType -> string
val prettyStringOfTyNoCx: denv:DisplayEnv -> x:TType -> string
......
......@@ -1046,14 +1046,15 @@ type internal TypeCheckInfo
| Some(CompletionContext.RecordField(RecordContext.Declaration false)) ->
GetDeclaredItems (parseResultsOpt, lineStr, origLongIdentOpt, colAtEndOfNamesAndResidue, residueOpt, lastDotPos, line, loc, filterCtors, resolveOverloads, false, getAllSymbols)
|> Option.map (fun (items, denv, m) ->
items
|> List.filter (fun cItem ->
match cItem.Item with
| Item.ModuleOrNamespaces _
| Item.Types _
| Item.UnqualifiedType _
| Item.ExnCase _ -> true
| _ -> false), denv, m)
items
|> List.filter (fun cItem ->
match cItem.Item with
| Item.ModuleOrNamespaces _
| Item.Types _
| Item.TypeVar _
| Item.UnqualifiedType _
| Item.ExnCase _ -> true
| _ -> false), denv, m)
// Other completions
| cc ->
......
......@@ -24,4 +24,5 @@ type FSharpGlyph =
| Union
| Variable
| ExtensionMethod
| Error
\ No newline at end of file
| Error
| TypeParameter
\ No newline at end of file
......@@ -380,6 +380,11 @@ module DeclarationListHelpers =
let remarks = toArray remarks
ToolTipElement.Single (layout, xml, remarks=remarks)
// Type variables
| Item.TypeVar (_, typar) ->
let layout = NicePrint.prettyLayoutOfTypar denv typar
ToolTipElement.Single (toArray layout, xml)
// F# Modules and namespaces
| Item.ModuleOrNamespaces(modref :: _ as modrefs) ->
//let os = StringBuilder()
......@@ -848,7 +853,7 @@ module internal DescriptionListsImpl =
| Item.CustomOperation _ -> FSharpGlyph.Method
| Item.MethodGroup (_, minfos, _) when minfos |> List.forall (fun minfo -> minfo.IsExtensionMember) -> FSharpGlyph.ExtensionMethod
| Item.MethodGroup _ -> FSharpGlyph.Method
| Item.TypeVar _
| Item.TypeVar _ -> FSharpGlyph.TypeParameter
| Item.Types _ -> FSharpGlyph.Class
| Item.UnqualifiedType (tcref :: _) ->
if tcref.IsEnumTycon || tcref.IsILEnumTycon then FSharpGlyph.Enum
......@@ -1031,9 +1036,12 @@ type DeclarationListInfo(declarations: DeclarationListItem[], isForType: bool, i
| Some u -> u.DisplayName
| None -> item.Item.DisplayNameCore
let textInCode =
match item.Unresolved with
| Some u -> u.DisplayName
| None -> item.Item.DisplayName
match item.Item with
| Item.TypeVar (name, typar) -> (if typar.StaticReq = Syntax.TyparStaticReq.None then "'" else " ^") + name
| _ ->
match item.Unresolved with
| Some u -> u.DisplayName
| None -> item.Item.DisplayName
textInDeclList, textInCode, items)
// Filter out operators, active patterns (as values)
......
......@@ -461,7 +461,7 @@ module SyntaxTraversal =
| SynExpr.Match (expr=synExpr; clauses=synMatchClauseList) ->
[yield dive synExpr synExpr.Range traverseSynExpr
yield! synMatchClauseList |> List.map (fun x -> dive x x.RangeOfGuardAndRhs (traverseSynMatchClause path))]
yield! synMatchClauseList |> List.map (fun x -> dive x x.Range (traverseSynMatchClause path))]
|> pick expr
| SynExpr.Do (synExpr, _range) -> traverseSynExpr synExpr
......@@ -608,7 +608,7 @@ module SyntaxTraversal =
| SynExpr.MatchBang (expr=synExpr; clauses=synMatchClauseList) ->
[yield dive synExpr synExpr.Range traverseSynExpr
yield! synMatchClauseList |> List.map (fun x -> dive x x.RangeOfGuardAndRhs (traverseSynMatchClause path))]
yield! synMatchClauseList |> List.map (fun x -> dive x x.Range (traverseSynMatchClause path))]
|> pick expr
| SynExpr.DoBang (synExpr, _range) -> traverseSynExpr synExpr
......@@ -634,7 +634,8 @@ module SyntaxTraversal =
let path = SyntaxNode.SynPat p :: origPath
match p with
| SynPat.Paren (p, _) -> traversePat path p
| SynPat.Or (p1, p2, _, _) -> [ p1; p2] |> List.tryPick (traversePat path)
| SynPat.As (p1, p2, _)
| SynPat.Or (p1, p2, _, _) -> [ p1; p2 ] |> List.tryPick (traversePat path)
| SynPat.Ands (ps, _)
| SynPat.Tuple (_, ps, _)
| SynPat.ArrayOrList (_, ps, _) -> ps |> List.tryPick (traversePat path)
......
......@@ -957,6 +957,9 @@ module ParsedInput =
| _ ->
defaultTraverse expr
// Unchecked.defaultof<str$>
| SynExpr.TypeApp (typeArgsRange = range) when rangeContainsPos range pos ->
Some CompletionContext.PatternType
| _ -> defaultTraverse expr
member _.VisitRecordField(path, copyOpt, field) =
......@@ -1076,6 +1079,12 @@ module ParsedInput =
None
| _ -> None)
member _.VisitPat (_, defaultTraverse, pat) =
match pat with
| SynPat.IsInst (_, range) when rangeContainsPos range pos ->
Some CompletionContext.PatternType
| _ -> defaultTraverse pat
member _.VisitModuleDecl(_path, defaultTraverse, decl) =
match decl with
| SynModuleDecl.Open(target, m) ->
......@@ -1102,12 +1111,15 @@ module ParsedInput =
Some CompletionContext.PatternType
| _ -> defaultTraverse ty
member _.VisitRecordDefn(_path, fields, _range) =
fields |> List.tryPick (fun (SynField (idOpt = idOpt; range = fieldRange)) ->
member _.VisitRecordDefn(_path, fields, range) =
fields
|> List.tryPick (fun (SynField (idOpt = idOpt; range = fieldRange)) ->
match idOpt with
| Some id when rangeContainsPos id.idRange pos -> Some(CompletionContext.RecordField(RecordContext.Declaration true))
| _ when rangeContainsPos fieldRange pos -> Some(CompletionContext.RecordField(RecordContext.Declaration false))
| _ -> None)
// No completions in a record outside of all fields
|> Option.orElseWith (fun () -> if rangeContainsPos range pos then Some CompletionContext.Invalid else None)
member _.VisitUnionDefn(_path, cases, _range) =
cases |> List.tryPick (fun (SynUnionCase (ident = id; caseType = caseType)) ->
......
......@@ -227,6 +227,11 @@
<target state="translated">formátování typu binary pro integery</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">informační zprávy související s referenčními buňkami</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">binäre Formatierung für ganze Zahlen</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">Informationsmeldungen im Zusammenhang mit Bezugszellen</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">formato binario para enteros</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">mensajes informativos relacionados con las celdas de referencia</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">mise en forme binaire pour les entiers</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">messages d’information liés aux cellules de référence</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">formattazione binaria per interi</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">messaggi informativi relativi alle celle di riferimento</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">整数のバイナリ形式</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">参照セルに関連する情報メッセージ</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">정수에 대한 이진 서식 지정</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">참조 셀과 관련된 정보 메시지</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">formatowanie danych binarnych dla liczb całkowitych</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">komunikaty informacyjne związane z odwołaniami do komórek</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">formatação binária para números inteiros</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">mensagens informativas relacionadas a células de referência</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">двоичное форматирование для целых чисел</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">информационные сообщения, связанные с ссылочными ячейками</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">tamsayılar için ikili biçim</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">başvuru hücreleriyle ilgili bilgi mesajları</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">整数的二进制格式设置</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">与引用单元格相关的信息性消息</target>
......
......@@ -227,6 +227,11 @@
<target state="translated">整數的二進位格式化</target>
<note />
</trans-unit>
<trans-unit id="featureReallyLongList">
<source>list literals of any size</source>
<target state="new">list literals of any size</target>
<note />
</trans-unit>
<trans-unit id="featureRefCellNotationInformationals">
<source>informational messages related to reference cells</source>
<target state="translated">與參考儲存格相關的資訊訊息</target>
......
......@@ -18,6 +18,12 @@
</PropertyGroup>
<ItemGroup>
<None Include="**\*.cs;**\*.fs;**\*.fsx;**\*.fsi;" Exclude="@(Compile)">
<Link>%(RelativeDir)\TestSource\%(Filename)%(Extension)</Link>
</None>
<None Include="**\*.cs;**\*.fs;**\*.fsx;**\*.fsi" Exclude="@(Compile)">
<Link>%(RelativeDir)\TestSource\%(Filename)%(Extension)</Link>
</None>
<Compile Include="Conformance\BasicGrammarElements\OperatorNames\OperatorNames.fs" />
<Compile Include="Conformance\BasicGrammarElements\PrecedenceAndOperators\PrecedenceAndOperators.fs" />
<Compile Include="Conformance\BasicTypeAndModuleDefinitions\ExceptionDefinitions\ExceptionDefinitions.fs" />
......@@ -170,14 +176,9 @@
<Compile Include="Diagnostics\General.fs" />
<Compile Include="Globalization\GlobalizationTestCases.fs" />
<Compile Include="OCamlCompat\OCamlCompat.fs" />
<Compile Include="Miscellaneous\ListLiterals.fs" />
</ItemGroup>
<ItemGroup>
<None Include="**\*.cs;**\*.fs;**\*.fsx;**\*.fsi;" Exclude="@(Compile)">
<Link>%(RelativeDir)\TestSource\%(Filename)%(Extension)</Link>
</None>
<None Include="**\*.cs;**\*.fs;**\*.fsx;**\*.fsi" Exclude="@(Compile)">
<Link>%(RelativeDir)\TestSource\%(Filename)%(Extension)</Link>
</None>
<Content Include="resources\**" CopyToOutputDirectory="Never" CopyToPublishDirectory="PreserveNewest" />
<EmbeddedResource Remove="Properties\**" />
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
......
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace FSharp.Compiler.ComponentTests.Miscellaneous
open Xunit
open FSharp.Test
open FSharp.Test.Compiler
module ListLiterals =
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"ReallyLongList01.fs"|])>]
let ``List literals still have limited length in langversion 6`` compilation =
compilation
|> asFsx
|> withLangVersion60
|> compile
|> shouldFail
|> withErrorCode 742
|> withDiagnosticMessageMatches "This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList."
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"ReallyLongList01.fs"|])>]
let ``List literals have no limited length in langversion preview`` compilation =
compilation
|> asFsx
|> withLangVersionPreview
|> compile
|> shouldSucceed
\ No newline at end of file
let names = [
"Aaron";
"Abbey";
"Abbie";
"Abby";
"Abel";
"Abigail";
"Abraham";
"Abram";
"Adam";
"Adan";
"Addison";
"Adolfo";
"Adrain";
"Adrian";
"Adrian";
"Adriana";
"Adriane";
"Adrianna";
"Adrianne";
"Adrienne";
"Agustin";
"Ahmad";
"Ahmed";
"Aileen";
"Aimee";
"Aisha";
"Aja";
"Akeem";
"Al";
"Alaina";
"Alan";
"Alana";
"Alanna";
"Albert";
"Alberto";
"Aldo";
"Alec";
"Alecia";
"Alejandra";
"Alejandro";
"Alesha";
"Alex";
"Alexa";
"Alexander";
"Alexandra";
"Alexandria";
"Alexia";
"Alexis";
"Alexis";
"Alfonso";
"Alfred";
"Alfredo";
"Ali";
"Ali";
"Alice";
"Alicia";
"Alina";
"Alisa";
"Alisha";
"Alison";
"Alissa";
"Allan";
"Allen";
"Allie";
"Allison";
"Allyson";
"Alma";
"Alonzo";
"Alphonso";
"Alton";
"Alvaro";
"Alvin";
"Alycia";
"Alyse";
"Alysha";
"Alysia";
"Alyson";
"Alyssa";
"Amanda";
"Amanda";
"Amber";
"Amelia";
"Ami";
"Amie";
"Amir";
"Amit";
"Amos";
"Amy";
"Ana";
"Anastasia";
"Anderson";
"Andre";
"Andrea";
"Andrea";
"Andreas";
"Andres";
"Andrew";
"Andrew";
"Andria";
"Andy";
"Angel";
"Angel";
"Angela";
"Angelia";
"Angelica";
"Angelina";
"Angelique";
"Angelo";
"Angie";
"Anita";
"Ann";
"Anna";
"Anne";
"Annemarie";
"Annette";
"Annie";
"Annmarie";
"Anthony";
"Anthony";
"Antione";
"Antoine";
"Antoinette";
"Anton";
"Antonia";
"Antonio";
"Antony";
"Antwan";
"Antwon";
"April";
"Araceli";
"Archie";
"Ari";
"Ariana";
"Arianna";
"Aric";
"Ariel";
"Ariel";
"Arielle";
"Arlene";
"Armand";
"Armando";
"Arnold";
"Aron";
"Arron";
"Arthur";
"Arturo";
"Asa";
"Ashely";
"Ashlee";
"Ashleigh";
"Ashley";
"Ashley";
"Ashli";
"Ashlie";
"Ashly";
"Ashlyn";
"Ashton";
"Ashton";
"Asia";
"Athena";
"Aubrey";
"Aubrey";
"Audra";
"Audrey";
"August";
"Aurora";
"Austin";
"Autumn";
"Avery";
"Baby";
"Bailey";
"Barbara";
"Barrett";
"Barry";
"Bart";
"Beatrice";
"Beatriz";
"Beau";
"Becky";
"Belinda";
"Ben";
"Benito";
"Benjamin";
"Bennett";
"Bennie";
"Benny";
"Bernadette";
"Bernard";
"Bernardo";
"Bertha";
"Beth";
"Bethany";
"Betsy";
"Betty";
"Beverly";
"Bianca";
"Bill";
"Billie";
"Billy";
"Blaine";
"Blair";
"Blair";
"Blake";
"Blanca";
"Bo";
"Bobbi";
"Bobbie";
"Bobby";
"Bonnie";
"Brad";
"Braden";
"Bradford";
"Bradley";
"Bradly";
"Brady";
"Brain";
"Brandan";
"Brandee";
"Branden";
"Brandi";
"Brandie";
"Brandin";
"Brandon";
"Brandon";
"Brandt";
"Brandy";
"Brandyn";
"Brannon";
"Brant";
"Braxton";
"Breann";
"Breanna";
"Breanne";
"Brenda";
"Brendan";
"Brenden";
"Brendon";
"Brenna";
"Brennan";
"Brent";
"Brenton";
"Bret";
"Brett";
"Brian";
"Briana";
"Brianna";
"Brianne";
"Brice";
"Bridget";
"Bridgett";
"Bridgette";
"Britany";
"Britney";
"Britni";
"Brittaney";
"Brittani";
"Brittanie";
"Brittany";
"Brittney";
"Brittni";
"Brittny";
"Britton";
"Brock";
"Broderick";
"Brody";
"Bronson";
"Brook";
"Brooke";
"Brooks";
"Bruce";
"Bryan";
"Bryant";
"Bryce";
"Brynn";
"Bryon";
"Bryson";
"Buddy";
"Byron";
"Caitlin";
"Caitlyn";
"Cale";
"Caleb";
"Callie";
"Calvin";
"Cameron";
"Cameron";
"Camille";
"Candace";
"Candi";
"Candice";
"Candis";
"Candy";
"Cara";
"Carey";
"Carey";
"Cari";
"Carina";
"Carissa";
"Carl";
"Carla";
"Carley";
"Carlo";
"Carlos";
"Carlton";
"Carly";
"Carmen";
"Carol";
"Carolina";
"Caroline";
"Carolyn";
"Carrie";
"Carson";
"Carter";
"Cary";
"Caryn";
"Casandra";
"Casey";
"Casey";
"Casie";
"Cassandra";
"Cassidy";
"Cassidy";
"Cassie";
"Cassondra";
"Catherine";
"Cathleen";
"Cathy";
"Catrina";
"Cecelia";
"Cecil";
"Cecilia";
"Cedric";
"Cedrick";
"Celeste";
"Celia";
"Celina";
"Cesar";
"Chad";
"Chadd";
"Chadwick";
"Chaim";
"Chana";
"Chance";
"Chandler";
"Chandra";
"Chanel";
"Channing";
"Chantal";
"Chantel";
"Chantelle";
"Charissa";
"Charity";
"Charlene";
"Charles";
"Charlie";
"Charlotte";
"Charmaine";
"Chase";
"Chasity";
"Chastity";
"Chauncey";
"Chaz";
"Chelsea";
"Chelsey";
"Chelsie";
"Cheri";
"Cherie";
"Cherish";
"Cheryl";
"Chester";
"Chet";
"Cheyenne";
"Chiquita";
"Chloe";
"Chris";
"Christa";
"Christal";
"Christen";
"Christi";
"Christian";
"Christian";
"Christie";
"Christin";
"Christina";
"Christine";
"Christop";
"Christoper";
"Christopher";
"Christopher";
"Christy";
"Chrystal";
"Ciara";
"Ciera";
"Cierra";
"Cindy";
"Claire";
"Clara";
"Clare";
"Clarence";
"Clarissa";
"Clark";
"Claude";
"Claudia";
"Clay";
"Clayton";
"Cleveland";
"Cliff";
"Clifford";
"Clifton";
"Clint";
"Clinton";
"Clyde";
"Coby";
"Cody";
"Cody";
"Colby";
"Cole";
"Coleman";
"Colette";
"Colin";
"Colleen";
"Collin";
"Colt";
"Colton";
"Connie";
"Connor";
"Conor";
"Conrad";
"Constance";
"Cooper";
"Cora";
"Corbin";
"Cordell";
"Cordero";
"Corey";
"Corey";
"Cori";
"Corina";
"Corinne";
"Cornelius";
"Cornell";
"Corrie";
"Corrine";
"Cortez";
"Cortney";
"Cortney";
"Cory";
"Cory";
"Coty";
"Courtney";
"Courtney";
"Coy";
"Craig";
"Cristal";
"Cristian";
"Cristin";
"Cristina";
"Cristobal";
"Cristopher";
"Cristy";
"Cruz";
"Crystal";
"Cullen";
"Curt";
"Curtis";
"Cynthia";
"Cyrus";
"Daisy";
"Dakota";
"Dale";
"Dallas";
"Dalton";
"Damian";
"Damien";
"Damion";
"Damon";
"Dan";
"Dana";
"Dana";
"Dandre";
"Dane";
"Danelle";
"Dangelo";
"Danial";
"Danica";
"Daniel";
"Daniel";
"Daniela";
"Daniella";
"Danielle";
"Danny";
"Dante";
"Danyelle";
"Daphne";
"Dara";
"Darcy";
"Daren";
"Darian";
"Darin";
"Dario";
"Darius";
"Darla";
"Darlene";
"Darnell";
"Daron";
"Darrel";
"Darrell";
"Darren";
"Darrick";
"Darrin";
"Darrius";
"Darron";
"Darryl";
"Darwin";
"Daryl";
"Dave";
"David";
"David";
"Davin";
"Davis";
"Davon";
"Dawn";
"Dayna";
"Dean";
"Deana";
"Deandre";
"Deangelo";
"Deanna";
"Debbie";
"Deborah";
"Debra";
"Dedrick";
"Deena";
"Deidra";
"Deidre";
"Deirdre";
"Dejuan";
"Delbert";
"Delia";
"Delilah";
"Demarco";
"Demarcus";
"Demario";
"Demetria";
"Demetrius";
"Dena";
"Denis";
"Denise";
"Dennis";
"Denny";
"Denver";
"Deon";
"Deonte";
"Dereck";
"Derek";
"Deric";
"Derick";
"Derik";
"Deron";
"Derrell";
"Derrick";
"Deshawn";
"Desirae";
"Desiree";
"Desmond";
"Destiny";
"Devan";
"Deven";
"Devin";
"Devin";
"Devon";
"Devon";
"Dewayne";
"Dewey";
"Dexter";
"Diamond";
"Diana";
"Diane";
"Dianna";
"Diego";
"Dillon";
"Dina";
"Dion";
"Dirk";
"Dolores";
"Domingo";
"Dominic";
"Dominick";
"Dominique";
"Dominique";
"Dominque";
"Domonique";
"Don";
"Donald";
"Donavan";
"Donna";
"Donnell";
"Donnie";
"Donny";
"Donovan";
"Donta";
"Dontae";
"Donte";
"Dora";
"Dorian";
"Doris";
"Dorothy";
"Douglas";
"Drake";
"Drew";
"Duane";
"Duncan";
"Dustin";
"Dusty";
"Dwayne";
"Dwight";
"Dylan";
"Earl";
"Earnest";
"Eboni";
"Ebony";
"Eddie";
"Eddy";
"Edgar";
"Edgardo";
"Edith";
"Edmond";
"Edmund";
"Edna";
"Eduardo";
"Edward";
"Edwardo";
"Edwin";
"Efrain";
"Efren";
"Eileen";
"Elaina";
"Elaine";
"Eleanor";
"Elena";
"Eli";
"Elias";
"Eliezer";
"Elijah";
"Elisa";
"Elisabeth";
"Elise";
"Eliseo";
"Elisha";
"Elisha";
"Elissa";
"Eliza";
"Elizabeth";
"Elizabeth";
"Ellen";
"Elliot";
"Elliott";
"Ellis";
"Elmer";
"Eloy";
"Elsa";
"Elton";
"Elvin";
"Elvis";
"Elyse";
"Emanuel";
"Emilee";
"Emilie";
"Emilio";
"Emily";
"Emma";
"Emmanuel";
"Emmett";
"Enrique";
"Eric";
"Erica";
"Erich";
"Erick";
"Ericka";
"Erik";
"Erika";
"Erin";
"Erin";
"Ernest";
"Ernesto";
"Ernie";
"Errol";
"Ervin";
"Erwin";
"Esmeralda";
"Esteban";
"Estevan";
"Esther";
"Ethan";
"Eugene";
"Eunice";
"Eva";
"Evan";
"Evelyn";
"Everett";
"Ezekiel";
"Ezequiel";
"Ezra";
"Fabian";
"Faith";
"Fallon";
"Fatima";
"Federico";
"Felecia";
"Felicia";
"Felipe";
"Felisha";
"Felix";
"Fernando";
"Fidel";
"Floyd";
"Forrest";
"Frances";
"Francesca";
"Francesco";
"Francine";
"Francis";
"Francisco";
"Frank";
"Frankie";
"Franklin";
"Fred";
"Freddie";
"Freddy";
"Frederick";
"Fredrick";
"Gabriel";
"Gabriela";
"Gabriella";
"Gabrielle";
"Gail";
"Galen";
"Garett";
"Garret";
"Garrett";
"Garrick";
"Garry";
"Gary";
"Gavin";
"Gena";
"Genaro";
"Gene";
"Geneva";
"Genevieve";
"Geoffrey";
"George";
"Georgia";
"Georgina";
"Gerald";
"Gerard";
"Gerardo";
"German";
"Gilbert";
"Gilberto";
"Gillian";
"Gina";
"Ginger";
"Gino";
"Giovanni";
"Giselle";
"Giuseppe";
"Gladys";
"Glen";
"Glenda";
"Glenn";
"Gloria";
"Gonzalo";
"Gordon";
"Grace";
"Graciela";
"Grady";
"Graham";
"Grant";
"Grayson";
"Greg";
"Gregg";
"Greggory";
"Gregorio";
"Gregory";
"Gretchen";
"Griffin";
"Griselda";
"Guadalupe";
"Guadalupe";
"Guillermo";
"Gustavo";
"Guy";
"Gwendolyn";
"Hailey";
"Haley";
"Hallie";
"Hank";
"Hanna";
"Hannah";
"Hans";
"Harley";
"Harold";
"Harrison";
"Harry";
"Harvey";
"Hassan";
"Hayden";
"Hayley";
"Heath";
"Heather";
"Hector";
"Heidi";
"Helen";
"Helena";
"Henry";
"Herbert";
"Heriberto";
"Herman";
"Hilary";
"Hilda";
"Hillary";
"Holli";
"Hollie";
"Holly";
"Hope";
"Horace";
"Houston";
"Howard";
"Hubert";
"Hugh";
"Hugo";
"Humberto";
"Hunter";
"Ian";
"Iesha";
"Ignacio";
"India";
"Ingrid";
"Ira";
"Irene";
"Iris";
"Irma";
"Irvin";
"Irving";
"Isaac";
"Isabel";
"Isaiah";
"Isaias";
"Isiah";
"Isidro";
"Ismael";
"Israel";
"Issac";
"Ivan";
"Ivy";
"Jabari";
"Jace";
"Jack";
"Jackie";
"Jackie";
"Jacklyn";
"Jackson";
"Jaclyn";
"Jacob";
"Jacqueline";
"Jacquelyn";
"Jacques";
"Jada";
"Jade";
"Jade";
"Jaime";
"Jaime";
"Jaimie";
"Jairo";
"Jake";
"Jakob";
"Jaleesa";
"Jalisa";
"Jamaal";
"Jamal";
"Jamar";
"Jamel";
"James";
"James";
"Jameson";
"Jamey";
"Jami";
"Jamie";
"Jamie";
"Jamil";
"Jamila";
"Jamison";
"Jan";
"Jana";
"Janae";
"Janay";
"Jane";
"Janel";
"Janell";
"Janelle";
"Janessa";
"Janet";
"Janette";
"Janice";
"Janie";
"Janine";
"Janna";
"Jarad";
"Jared";
"Jarod";
"Jaron";
"Jarred";
"Jarrell";
"Jarret";
"Jarrett";
"Jarrod";
"Jarvis";
"Jasen";
"Jasmin";
"Jasmine";
"Jason";
"Jason";
"Jasper";
"Javier";
"Javon";
"Jay";
"Jayme";
"Jayme";
"Jayson";
"Jazmin";
"Jazmine";
"Jean";
"Jean";
"Jeana";
"Jeanette";
"Jeanine";
"Jeanna";
"Jeanne";
"Jeannette";
"Jeannie";
"Jed";
"Jedediah";
"Jedidiah";
"Jeff";
"Jefferson";
"Jeffery";
"Jeffrey";
"Jeffry";
"Jena";
"Jenelle";
"Jenifer";
"Jenna";
"Jenni";
"Jennie";
"Jennifer";
"Jennifer";
"Jenny";
"Jerad";
"Jerald";
"Jeramie";
"Jeramy";
"Jered";
"Jerel";
"Jereme";
"Jeremey";
"Jeremiah";
"Jeremie";
"Jeremy";
"Jeri";
"Jermaine";
"Jermey";
"Jerod";
"Jerome";
"Jeromy";
"Jerrell";
"Jerrica";
"Jerrod";
"Jerry";
"Jesica";
"Jess";
"Jesse";
"Jesse";
"Jessi";
"Jessica";
"Jessica";
"Jessie";
"Jessie";
"Jessika";
"Jessy";
"Jesus";
"Jill";
"Jillian";
"Jim";
"Jimmie";
"Jimmy";
"Jo";
"Joan";
"Joann";
"Joanna";
"Joanne";
"Joaquin";
"Jocelyn";
"Jodi";
"Jodie";
"Jody";
"Jody";
"Joe";
"Joel";
"Joelle";
"Joesph";
"Joey";
"Johanna";
"Johathan";
"John";
"John";
"Johnathan";
"Johnathon";
"Johnna";
"Johnnie";
"Johnny";
"Johnpaul";
"Jolene";
"Jon";
"Jonah";
"Jonas";
"Jonathan";
"Jonathan";
"Jonathon";
"Joni";
"Jordan";
"Jordan";
"Jordon";
"Jorge";
"Jory";
"Jose";
"Josef";
"Joseph";
"Joseph";
"Josephine";
"Josh";
"Joshua";
"Joshua";
"Josiah";
"Josie";
"Josue";
"Jovan";
"Joy";
"Joyce";
"Juan";
"Juana";
"Juanita";
"Judith";
"Judson";
"Judy";
"Julia";
"Julian";
"Juliana";
"Julianna";
"Julianne";
"Julie";
"Juliet";
"Julio";
"Julius";
"June";
"Junior";
"Justen";
"Justin";
"Justin";
"Justina";
"Justine";
"Justine";
"Juston";
"Kacey";
"Kaci";
"Kacie";
"Kacy";
"Kai";
"Kaila";
"Kaitlin";
"Kaitlyn";
"Kala";
"Kaleb";
"Kaleigh";
"Kaley";
"Kali";
"Kameron";
"Kami";
"Kandace";
"Kandice";
"Kara";
"Kareem";
"Karen";
"Kari";
"Karin";
"Karina";
"Karissa";
"Karl";
"Karla";
"Karrie";
"Kasey";
"Kasey";
"Kassandra";
"Kassie";
"Kate";
"Katelin";
"Katelyn";
"Katelynn";
"Katharine";
"Katherine";
"Katheryn";
"Kathleen";
"Kathrine";
"Kathryn";
"Kathy";
"Kati";
"Katie";
"Katlyn";
"Katrina";
"Katy";
"Kayla";
"Kaylee";
"Kayleigh";
"Keaton";
"Keegan";
"Keely";
"Keenan";
"Keisha";
"Keith";
"Kellen";
"Kelley";
"Kelli";
"Kellie";
"Kelly";
"Kelly";
"Kelsey";
"Kelsey";
"Kelsie";
"Kelvin";
"Ken";
"Kendall";
"Kendall";
"Kendra";
"Kendrick";
"Kenneth";
"Kenny";
"Kent";
"Kenton";
"Kenya";
"Keon";
"Keri";
"Kerri";
"Kerrie";
"Kerry";
]
if List.length names <> 1153 then failwith "List length doesn't match"
\ No newline at end of file
......@@ -2654,6 +2654,7 @@ FSharp.Compiler.EditorServices.FSharpGlyph+Tags: Int32 Property
FSharp.Compiler.EditorServices.FSharpGlyph+Tags: Int32 Struct
FSharp.Compiler.EditorServices.FSharpGlyph+Tags: Int32 Type
FSharp.Compiler.EditorServices.FSharpGlyph+Tags: Int32 Typedef
FSharp.Compiler.EditorServices.FSharpGlyph+Tags: Int32 TypeParameter
FSharp.Compiler.EditorServices.FSharpGlyph+Tags: Int32 Union
FSharp.Compiler.EditorServices.FSharpGlyph+Tags: Int32 Variable
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean Equals(FSharp.Compiler.EditorServices.FSharpGlyph)
......@@ -2678,6 +2679,7 @@ FSharp.Compiler.EditorServices.FSharpGlyph: Boolean IsProperty
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean IsStruct
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean IsType
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean IsTypedef
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean IsTypeParameter
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean IsUnion
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean IsVariable
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean get_IsClass()
......@@ -2699,6 +2701,7 @@ FSharp.Compiler.EditorServices.FSharpGlyph: Boolean get_IsProperty()
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean get_IsStruct()
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean get_IsType()
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean get_IsTypedef()
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean get_IsTypeParameter()
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean get_IsUnion()
FSharp.Compiler.EditorServices.FSharpGlyph: Boolean get_IsVariable()
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph Class
......@@ -2720,6 +2723,7 @@ FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FShar
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph Struct
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph Type
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph Typedef
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph TypeParameter
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph Union
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph Variable
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph get_Class()
......@@ -2741,6 +2745,7 @@ FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FShar
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph get_Struct()
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph get_Type()
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph get_Typedef()
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph get_TypeParameter()
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph get_Union()
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph get_Variable()
FSharp.Compiler.EditorServices.FSharpGlyph: FSharp.Compiler.EditorServices.FSharpGlyph+Tags
......
......@@ -20,7 +20,6 @@
SOURCE=final_yield_keyword_01.fs SCFLAGS="--test:ErrorRanges --warnaserror" # final_yield_keyword_01.fs
SOURCE=E_final_yield_dash_gt_01.fs SCFLAGS="--test:ErrorRanges" # E_final_yield_dash_gt_01.fs
SOURCE=E_ReallyLongList01.fs # E_ReallyLongList01.fs
SOURCE=ReallyLongArray01.fs # ReallyLongArray01.fs
SOURCE=YieldInsideFlowControl.fs # YieldInsideFlowControl.fs
......@@ -221,6 +221,7 @@ type NavigationItem with
| Some SynAccess.Internal -> FSharpRoslynGlyph.ExtensionMethodInternal
| _ -> FSharpRoslynGlyph.ExtensionMethodPublic
| FSharpGlyph.Error -> FSharpRoslynGlyph.Error
| FSharpGlyph.TypeParameter -> FSharpRoslynGlyph.TypeParameter
[<RequireQualifiedAccess>]
module String =
......
......@@ -147,6 +147,7 @@ module internal Tokenizer =
| Private -> Glyph.StructurePrivate
| FSharpGlyph.Variable -> Glyph.Local
| FSharpGlyph.Error -> Glyph.Error
| FSharpGlyph.TypeParameter -> Glyph.TypeParameter
let GetImageIdForSymbol(symbolOpt:FSharpSymbol option, kind:LexerSymbolKind) =
let imageId =
......@@ -243,6 +244,7 @@ module internal Tokenizer =
| Internal -> KnownImageIds.ClassInternal
| Protected -> KnownImageIds.ClassProtected
| Private -> KnownImageIds.ClassPrivate
| :? FSharpGenericParameter -> KnownImageIds.Type
| _ -> KnownImageIds.None
if imageId = KnownImageIds.None then
None
......@@ -345,6 +347,7 @@ module internal Tokenizer =
| Internal -> Glyph.ClassInternal
| Protected -> Glyph.ClassProtected
| Private -> Glyph.ClassPrivate
| :? FSharpGenericParameter -> Glyph.TypeParameter
| _ -> Glyph.None
......
......@@ -219,6 +219,7 @@ type internal FSharpDeclarations_DEPRECATED(documentationBuilder, declarations:
| FSharpGlyph.Field
| FSharpGlyph.Delegate
| FSharpGlyph.Variable
| FSharpGlyph.TypeParameter
| FSharpGlyph.Error -> None
|> Option.defaultValue ObsoleteGlyph.Class
|> int
......
......@@ -647,6 +647,25 @@ let _ = fun (p:l) -> ()
"""
VerifyCompletionList(fileContents, "let _ = fun (p:l", ["LanguagePrimitives"; "List"], ["let"; "log"])
[<Test>]
let ``Completions in match clause type test contain modules and types but not keywords or functions``() =
let fileContents = """
match box 5 with
| :? l as x -> ()
| _ -> ()
"""
VerifyCompletionList(fileContents, ":? l", ["LanguagePrimitives"; "List"], ["let"; "log"])
[<Test>]
let ``Completions in catch clause type test contain modules and types but not keywords or functions``() =
let fileContents = """
try
()
with :? l as x ->
()
"""
VerifyCompletionList(fileContents, ":? l", ["LanguagePrimitives"; "List"], ["let"; "log"])
[<Test>]
let ``Extensions.Bug5162``() =
let fileContents = """
......@@ -751,12 +770,26 @@ type A = { le: string }
VerifyNoCompletionList(fileContents, "le")
[<Test>]
let ``Completion list on record field type at declaration site contains modules and types but not keywords or functions``() =
let ``Completion list on record field type at declaration site contains modules, types and type parameters but not keywords or functions``() =
let fileContents = """
type A = { Field: l }
type A<'lType> = { Field: l }
"""
VerifyCompletionList(fileContents, "Field: l", ["LanguagePrimitives"; "List"], ["let"; "log"])
[<Test>]
let ``No completion on record stub with no fields at declaration site``() =
let fileContents = """
type A = { }
"""
VerifyNoCompletionList(fileContents, "{ ")
[<Test>]
let ``No completion on record outside of all fields at declaration site``() =
let fileContents = """
type A = { Field: string; }
"""
VerifyNoCompletionList(fileContents, "; ")
[<Test>]
let ``No completion on union case identifier at declaration site``() =
let fileContents = """
......@@ -774,20 +807,28 @@ type A =
VerifyNoCompletionList(fileContents, "str")
[<Test>]
let ``Completion list on union case type at declaration site contains modules and types but not keywords or functions``() =
let ``Completion list on union case type at declaration site contains modules, types and type parameters but not keywords or functions``() =
let fileContents = """
type A =
type A<'lType> =
| Case of blah: int * str: l
"""
VerifyCompletionList(fileContents, "str: l", ["LanguagePrimitives"; "List"], ["let"; "log"])
VerifyCompletionList(fileContents, "str: l", ["LanguagePrimitives"; "List"; "lType"], ["let"; "log"])
[<Test>]
let ``Completion list on union case type at declaration site contains modules and types but not keywords or functions2``() =
let ``Completion list on union case type at declaration site contains modules, types and type parameters but not keywords or functions2``() =
let fileContents = """
type A =
type A<'lType> =
| Case of l
"""
VerifyCompletionList(fileContents, "of l", ["LanguagePrimitives"; "List"], ["let"; "log"])
VerifyCompletionList(fileContents, "of l", ["LanguagePrimitives"; "List"; "lType"], ["let"; "log"])
[<Test>]
let ``Completion list on union case type at declaration site contains type parameter``() =
let fileContents = """
type A<'keyType> =
| Case of key
"""
VerifyCompletionList(fileContents, "of key", ["keyType"], [])
[<Test>]
let ``Completion list on type alias contains modules and types but not keywords or functions``() =
......@@ -804,6 +845,38 @@ type A =
"""
VerifyNoCompletionList(fileContents, "| C")
[<Test>]
let ``Completion list in generic function body contains type parameter``() =
let fileContents = """
let Null<'wrappedType> () =
Unchecked.defaultof<wrapp>
"""
VerifyCompletionList(fileContents, "defaultof<wrapp", ["wrappedType"], [])
[<Test>]
let ``Completion list in generic method body contains type parameter``() =
let fileContents = """
type A () =
member _.Null<'wrappedType> () = Unchecked.defaultof<wrapp>
"""
VerifyCompletionList(fileContents, "defaultof<wrapp", ["wrappedType"], [])
[<Test>]
let ``Completion list in generic class method body contains type parameter``() =
let fileContents = """
type A<'wrappedType> () =
member _.Null () = Unchecked.defaultof<wrapp>
"""
VerifyCompletionList(fileContents, "defaultof<wrapp", ["wrappedType"], [])
[<Test>]
let ``Completion list in type application contains modules, types and type parameters but not keywords or functions``() =
let fileContents = """
let emptyMap<'keyType, 'lValueType> () =
Map.empty<'keyType, l>
"""
VerifyCompletionList(fileContents, ", l", ["LanguagePrimitives"; "List"; "lValueType"], ["let"; "log"])
#if EXE
ShouldDisplaySystemNamespace()
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册