Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more using-alias-to-type tests #66889

Merged
Merged
Show file tree
Hide file tree
Changes from 131 commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
cdf67db
Add parsing of using aliases that point to types.
CyrusNajmabadi Dec 29, 2020
7acfeba
Update API surface.
CyrusNajmabadi Dec 29, 2020
ba290a2
Fix tests
CyrusNajmabadi Dec 30, 2020
4f970f5
Add parsing tests
CyrusNajmabadi Dec 30, 2020
538637f
Add binding support
CyrusNajmabadi Dec 30, 2020
b7adad3
Update IDE side.
CyrusNajmabadi Dec 30, 2020
b64aeac
Add semantic tests
CyrusNajmabadi Dec 30, 2020
984bf0f
Support functptr types
CyrusNajmabadi Dec 30, 2020
b492649
Disallow ref types
CyrusNajmabadi Dec 30, 2020
523de61
Merge remote-tracking branch 'upstream/main' into usingAliasType
CyrusNajmabadi Sep 9, 2021
28c54b4
Merge
CyrusNajmabadi Sep 9, 2021
eb37ef3
Merge remote-tracking branch 'upstream/main' into usingAliasType
CyrusNajmabadi Jan 14, 2023
dda5b30
Fix
CyrusNajmabadi Jan 14, 2023
a314010
Fix
CyrusNajmabadi Jan 14, 2023
c67a9a1
move more cases to type
CyrusNajmabadi Jan 14, 2023
aa49836
Move error
CyrusNajmabadi Jan 14, 2023
27c0fcd
Add unsafe modifier
CyrusNajmabadi Jan 14, 2023
af583bb
Bind with unsafe
CyrusNajmabadi Jan 14, 2023
e2a1d78
No nullable reference types
CyrusNajmabadi Jan 14, 2023
f90faaa
Update apis
CyrusNajmabadi Jan 15, 2023
0185eac
Add apis
CyrusNajmabadi Jan 15, 2023
e6a3b1f
Add api
CyrusNajmabadi Jan 15, 2023
bc8ba4d
Add api
CyrusNajmabadi Jan 15, 2023
313b69c
Add api
CyrusNajmabadi Jan 15, 2023
6aeac08
Fix
CyrusNajmabadi Jan 15, 2023
308acb0
NRT
CyrusNajmabadi Jan 15, 2023
288b7c9
NRT
CyrusNajmabadi Jan 15, 2023
0f12baa
NRT
CyrusNajmabadi Jan 15, 2023
6e7cee3
Fix
CyrusNajmabadi Jan 15, 2023
f81f89f
Move
CyrusNajmabadi Jan 15, 2023
2b27982
Add error facts
CyrusNajmabadi Jan 15, 2023
a5e8b9e
Add error facts
CyrusNajmabadi Jan 15, 2023
9bbda42
Add tests
CyrusNajmabadi Jan 15, 2023
2e6998e
Add tests
CyrusNajmabadi Jan 15, 2023
5dddfc2
Add c# 11 test
CyrusNajmabadi Jan 15, 2023
9e2c969
Add unsafe tests
CyrusNajmabadi Jan 15, 2023
492c9ea
Add unsafe tests
CyrusNajmabadi Jan 15, 2023
74cd663
Dynamic work
CyrusNajmabadi Jan 15, 2023
0fae0b0
Update feature status
CyrusNajmabadi Jan 15, 2023
0eb5ee5
Delete
CyrusNajmabadi Jan 15, 2023
e169a14
Update
CyrusNajmabadi Jan 15, 2023
e5e06c4
Add comment
CyrusNajmabadi Jan 15, 2023
b860116
Fix test
CyrusNajmabadi Jan 15, 2023
972e75a
Fix test
CyrusNajmabadi Jan 15, 2023
54374bd
Fix test
CyrusNajmabadi Jan 15, 2023
42d7759
Add tests
CyrusNajmabadi Jan 15, 2023
82254d4
Add tests
CyrusNajmabadi Jan 15, 2023
28c7cff
Update docs/Language Feature Status.md
CyrusNajmabadi Jan 25, 2023
762bd01
Add tests
CyrusNajmabadi Jan 25, 2023
2c4c046
Add support for top level dynamic
CyrusNajmabadi Jan 25, 2023
9bab6d6
Add support for top level dynamic
CyrusNajmabadi Jan 26, 2023
f78bbd7
Fix loc string
CyrusNajmabadi Jan 26, 2023
275a688
Move into 12.0 section
CyrusNajmabadi Jan 27, 2023
5f3a2c4
Add test
CyrusNajmabadi Jan 27, 2023
3a80d86
Add test
CyrusNajmabadi Jan 27, 2023
8dbb1ec
Move errors to binding
CyrusNajmabadi Jan 27, 2023
087b508
Add tests
CyrusNajmabadi Jan 27, 2023
0f25385
Use file scoped namespace
CyrusNajmabadi Jan 27, 2023
73982a7
Allow aliases to nint/nuint.
CyrusNajmabadi Jan 27, 2023
ef40e33
Add tests
CyrusNajmabadi Jan 27, 2023
4979ff0
Add tests
CyrusNajmabadi Jan 27, 2023
3cf2096
Add comment
CyrusNajmabadi Jan 27, 2023
07a27aa
Update test
CyrusNajmabadi Jan 27, 2023
6321355
Merge remote-tracking branch 'upstream/features/UsingAliasesTypes' in…
CyrusNajmabadi Jan 27, 2023
cb49fae
Merge remote-tracking branch 'upstream/features/UsingAliasesTypes' in…
CyrusNajmabadi Jan 30, 2023
8125da5
'dynamic' should bind to type
CyrusNajmabadi Jan 30, 2023
08279fb
Update docs/Language Feature Status.md
CyrusNajmabadi Jan 30, 2023
3b78a6d
Update tests
CyrusNajmabadi Jan 30, 2023
f7593d3
Merge branch 'usingAliasType' of https://github.com/CyrusNajmabadi/ro…
CyrusNajmabadi Jan 30, 2023
50e0ff4
PR feedback
CyrusNajmabadi Jan 31, 2023
3a5efe6
switch to typesymbol
CyrusNajmabadi Jan 31, 2023
149e5b5
Simplify
CyrusNajmabadi Jan 31, 2023
e154966
Add tests
CyrusNajmabadi Jan 31, 2023
73531cf
Add tests
CyrusNajmabadi Jan 31, 2023
fbf9b8d
Merge remote-tracking branch 'upstream/features/UsingAliasesTypes' in…
CyrusNajmabadi Feb 2, 2023
33ebdbe
Named parameter
CyrusNajmabadi Feb 2, 2023
bcbdcd6
Remove unused usings
CyrusNajmabadi Feb 2, 2023
3e1619a
Improve tests
CyrusNajmabadi Feb 2, 2023
8bffc64
Use RegularPreview
CyrusNajmabadi Feb 2, 2023
b114890
Update tests
CyrusNajmabadi Feb 2, 2023
e056e6b
Fix comment
CyrusNajmabadi Feb 2, 2023
6cc95af
Merge tests
CyrusNajmabadi Feb 2, 2023
b5a3ba3
Merge tests
CyrusNajmabadi Feb 2, 2023
c9d5b90
Add tests
CyrusNajmabadi Feb 2, 2023
97161ee
Syntax test only
CyrusNajmabadi Feb 2, 2023
289c0d8
Add using-alias tests
CyrusNajmabadi Feb 14, 2023
6d4ae38
Add using-alias tests
CyrusNajmabadi Feb 14, 2023
18698be
Add using-alias tests
CyrusNajmabadi Feb 14, 2023
80f4a17
Fix syntax normalization
CyrusNajmabadi Feb 14, 2023
7c2c0f1
Add obsolete tests
CyrusNajmabadi Feb 14, 2023
2c07069
Validate GetTypeInfo
CyrusNajmabadi Feb 14, 2023
debd1e0
Add tests
CyrusNajmabadi Feb 14, 2023
ff20eac
Add tests
CyrusNajmabadi Feb 14, 2023
30fc462
Simplify
CyrusNajmabadi Feb 14, 2023
efb7bcf
Explicit RegularNExt test
CyrusNajmabadi Feb 14, 2023
5ba730b
Update src/Compilers/CSharp/Test/Symbol/Symbols/Source/UsingAliasTest…
CyrusNajmabadi Feb 15, 2023
0f7cbfc
Update src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxNormalizerTests.cs
CyrusNajmabadi Feb 15, 2023
209ffca
Update src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxNormalizerTests.cs
CyrusNajmabadi Feb 15, 2023
c67ac2d
Update src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxNormalizerTests.cs
CyrusNajmabadi Feb 15, 2023
cfb671a
Update src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxNormalizerTests.cs
CyrusNajmabadi Feb 15, 2023
e517c96
Update src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxNormalizerTests.cs
CyrusNajmabadi Feb 15, 2023
e7443a5
Merge remote-tracking branch 'upstream/features/UsingAliasesTypes' in…
CyrusNajmabadi Feb 15, 2023
fb32a47
Add support for any type appearing in using-aliases
CyrusNajmabadi Feb 15, 2023
ea7a68f
Add support for any type appearing in using-aliases
CyrusNajmabadi Feb 15, 2023
3ae2753
Add support for any type appearing in using-aliases
CyrusNajmabadi Feb 15, 2023
6209d1f
Add classification tests
CyrusNajmabadi Feb 15, 2023
a0d9f14
Simplify
CyrusNajmabadi Feb 15, 2023
0129e69
Add tests
CyrusNajmabadi Feb 15, 2023
42500ce
Add formatting tests
CyrusNajmabadi Feb 15, 2023
a609f58
Add tests
CyrusNajmabadi Feb 15, 2023
fb2aee3
Add EnC support
CyrusNajmabadi Feb 15, 2023
985e360
Merge remote-tracking branch 'upstream/features/UsingAliasesTypes' in…
CyrusNajmabadi Feb 16, 2023
baf597a
Add tests
CyrusNajmabadi Feb 16, 2023
6f0f8d8
Add tests
CyrusNajmabadi Feb 16, 2023
3f523a4
Add tests
CyrusNajmabadi Feb 17, 2023
f87f685
Add tests
CyrusNajmabadi Feb 17, 2023
319126a
Syntactically
CyrusNajmabadi Feb 17, 2023
8c3d36c
remove helper
CyrusNajmabadi Feb 17, 2023
d1a296d
remove syntactic check
CyrusNajmabadi Feb 17, 2023
95fe908
REname member
CyrusNajmabadi Feb 17, 2023
6b6810e
Downstream
CyrusNajmabadi Feb 17, 2023
5293655
Downstream
CyrusNajmabadi Feb 17, 2023
4bd45d3
Downstream
CyrusNajmabadi Feb 17, 2023
3add0aa
Update tests
CyrusNajmabadi Feb 17, 2023
74def42
Update unshipped apis
CyrusNajmabadi Feb 17, 2023
a4c7ed9
Merge branch 'usingAliasType' into usingAliastests
CyrusNajmabadi Feb 17, 2023
17fd660
Dynamic completion
CyrusNajmabadi Feb 17, 2023
2babffb
Fixup
CyrusNajmabadi Feb 17, 2023
210a06f
Fix
CyrusNajmabadi Feb 17, 2023
926ca86
Fix
CyrusNajmabadi Feb 17, 2023
b35b7fe
Fix tests
CyrusNajmabadi Feb 17, 2023
83880eb
Add docs
CyrusNajmabadi Feb 17, 2023
89b9ac9
Remove comment
CyrusNajmabadi Feb 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ private static async Task<CompilationUnitSyntax> ExpandUsingDirectivesAsync(

private static async Task<SyntaxNode> ExpandUsingDirectiveAsync(Document document, UsingDirectiveSyntax usingDirective, CancellationToken cancellationToken)
{
var newType = await Simplifier.ExpandAsync(usingDirective.Type, document, cancellationToken: cancellationToken).ConfigureAwait(false);
return usingDirective.WithType(newType);
var newType = await Simplifier.ExpandAsync(usingDirective.NamespaceOrType, document, cancellationToken: cancellationToken).ConfigureAwait(false);
return usingDirective.WithNamespaceOrType(newType);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fallout of API review meeting. We decided to rename 'Type' to 'NamespaceOrType' (to match INamespaceOrTypeSymbol)

}

private static CompilationUnitSyntax MoveUsingsInsideNamespace(CompilationUnitSyntax compilationUnit)
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/Binder/Binder_Symbols.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ private NamedTypeSymbol BindNativeIntegerSymbolIfAny(IdentifierNameSyntax node,
case AttributeSyntax parent when parent.Name == node: // [nint]
return null;
case UsingDirectiveSyntax usingDirective:
if (usingDirective.Alias != null && usingDirective.Type == node)
if (usingDirective.Alias != null && usingDirective.NamespaceOrType == node)
{
// legal to write `using A = nuint;` as long as using-alias-to-type is enabled (checked later).
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19666,10 +19666,10 @@ internal sealed partial class UsingDirectiveSyntax : CSharpSyntaxNode
internal readonly SyntaxToken? staticKeyword;
internal readonly SyntaxToken? unsafeKeyword;
internal readonly NameEqualsSyntax? alias;
internal readonly TypeSyntax type;
internal readonly TypeSyntax namespaceOrType;
internal readonly SyntaxToken semicolonToken;

internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax type, SyntaxToken semicolonToken, DiagnosticInfo[]? diagnostics, SyntaxAnnotation[]? annotations)
internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax namespaceOrType, SyntaxToken semicolonToken, DiagnosticInfo[]? diagnostics, SyntaxAnnotation[]? annotations)
: base(kind, diagnostics, annotations)
{
this.SlotCount = 7;
Expand All @@ -19695,13 +19695,13 @@ internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, Synta
this.AdjustFlagsAndWidth(alias);
this.alias = alias;
}
this.AdjustFlagsAndWidth(type);
this.type = type;
this.AdjustFlagsAndWidth(namespaceOrType);
this.namespaceOrType = namespaceOrType;
this.AdjustFlagsAndWidth(semicolonToken);
this.semicolonToken = semicolonToken;
}

internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax type, SyntaxToken semicolonToken, SyntaxFactoryContext context)
internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax namespaceOrType, SyntaxToken semicolonToken, SyntaxFactoryContext context)
: base(kind)
{
this.SetFactoryContext(context);
Expand All @@ -19728,13 +19728,13 @@ internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, Synta
this.AdjustFlagsAndWidth(alias);
this.alias = alias;
}
this.AdjustFlagsAndWidth(type);
this.type = type;
this.AdjustFlagsAndWidth(namespaceOrType);
this.namespaceOrType = namespaceOrType;
this.AdjustFlagsAndWidth(semicolonToken);
this.semicolonToken = semicolonToken;
}

internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax type, SyntaxToken semicolonToken)
internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax namespaceOrType, SyntaxToken semicolonToken)
: base(kind)
{
this.SlotCount = 7;
Expand All @@ -19760,8 +19760,8 @@ internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, Synta
this.AdjustFlagsAndWidth(alias);
this.alias = alias;
}
this.AdjustFlagsAndWidth(type);
this.type = type;
this.AdjustFlagsAndWidth(namespaceOrType);
this.namespaceOrType = namespaceOrType;
this.AdjustFlagsAndWidth(semicolonToken);
this.semicolonToken = semicolonToken;
}
Expand All @@ -19771,7 +19771,7 @@ internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, Synta
public SyntaxToken? StaticKeyword => this.staticKeyword;
public SyntaxToken? UnsafeKeyword => this.unsafeKeyword;
public NameEqualsSyntax? Alias => this.alias;
public TypeSyntax Type => this.type;
public TypeSyntax NamespaceOrType => this.namespaceOrType;
public SyntaxToken SemicolonToken => this.semicolonToken;

internal override GreenNode? GetSlot(int index)
Expand All @@ -19782,7 +19782,7 @@ internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, Synta
2 => this.staticKeyword,
3 => this.unsafeKeyword,
4 => this.alias,
5 => this.type,
5 => this.namespaceOrType,
6 => this.semicolonToken,
_ => null,
};
Expand All @@ -19792,11 +19792,11 @@ internal UsingDirectiveSyntax(SyntaxKind kind, SyntaxToken? globalKeyword, Synta
public override void Accept(CSharpSyntaxVisitor visitor) => visitor.VisitUsingDirective(this);
public override TResult Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor) => visitor.VisitUsingDirective(this);

public UsingDirectiveSyntax Update(SyntaxToken globalKeyword, SyntaxToken usingKeyword, SyntaxToken staticKeyword, SyntaxToken unsafeKeyword, NameEqualsSyntax alias, TypeSyntax type, SyntaxToken semicolonToken)
public UsingDirectiveSyntax Update(SyntaxToken globalKeyword, SyntaxToken usingKeyword, SyntaxToken staticKeyword, SyntaxToken unsafeKeyword, NameEqualsSyntax alias, TypeSyntax namespaceOrType, SyntaxToken semicolonToken)
{
if (globalKeyword != this.GlobalKeyword || usingKeyword != this.UsingKeyword || staticKeyword != this.StaticKeyword || unsafeKeyword != this.UnsafeKeyword || alias != this.Alias || type != this.Type || semicolonToken != this.SemicolonToken)
if (globalKeyword != this.GlobalKeyword || usingKeyword != this.UsingKeyword || staticKeyword != this.StaticKeyword || unsafeKeyword != this.UnsafeKeyword || alias != this.Alias || namespaceOrType != this.NamespaceOrType || semicolonToken != this.SemicolonToken)
{
var newNode = SyntaxFactory.UsingDirective(globalKeyword, usingKeyword, staticKeyword, unsafeKeyword, alias, type, semicolonToken);
var newNode = SyntaxFactory.UsingDirective(globalKeyword, usingKeyword, staticKeyword, unsafeKeyword, alias, namespaceOrType, semicolonToken);
var diags = GetDiagnostics();
if (diags?.Length > 0)
newNode = newNode.WithDiagnosticsGreen(diags);
Expand All @@ -19810,10 +19810,10 @@ public UsingDirectiveSyntax Update(SyntaxToken globalKeyword, SyntaxToken usingK
}

internal override GreenNode SetDiagnostics(DiagnosticInfo[]? diagnostics)
=> new UsingDirectiveSyntax(this.Kind, this.globalKeyword, this.usingKeyword, this.staticKeyword, this.unsafeKeyword, this.alias, this.type, this.semicolonToken, diagnostics, GetAnnotations());
=> new UsingDirectiveSyntax(this.Kind, this.globalKeyword, this.usingKeyword, this.staticKeyword, this.unsafeKeyword, this.alias, this.namespaceOrType, this.semicolonToken, diagnostics, GetAnnotations());

internal override GreenNode SetAnnotations(SyntaxAnnotation[]? annotations)
=> new UsingDirectiveSyntax(this.Kind, this.globalKeyword, this.usingKeyword, this.staticKeyword, this.unsafeKeyword, this.alias, this.type, this.semicolonToken, GetDiagnostics(), annotations);
=> new UsingDirectiveSyntax(this.Kind, this.globalKeyword, this.usingKeyword, this.staticKeyword, this.unsafeKeyword, this.alias, this.namespaceOrType, this.semicolonToken, GetDiagnostics(), annotations);

internal UsingDirectiveSyntax(ObjectReader reader)
: base(reader)
Expand Down Expand Up @@ -19846,9 +19846,9 @@ internal UsingDirectiveSyntax(ObjectReader reader)
AdjustFlagsAndWidth(alias);
this.alias = alias;
}
var type = (TypeSyntax)reader.ReadValue();
AdjustFlagsAndWidth(type);
this.type = type;
var namespaceOrType = (TypeSyntax)reader.ReadValue();
AdjustFlagsAndWidth(namespaceOrType);
this.namespaceOrType = namespaceOrType;
var semicolonToken = (SyntaxToken)reader.ReadValue();
AdjustFlagsAndWidth(semicolonToken);
this.semicolonToken = semicolonToken;
Expand All @@ -19862,7 +19862,7 @@ internal override void WriteTo(ObjectWriter writer)
writer.WriteValue(this.staticKeyword);
writer.WriteValue(this.unsafeKeyword);
writer.WriteValue(this.alias);
writer.WriteValue(this.type);
writer.WriteValue(this.namespaceOrType);
writer.WriteValue(this.semicolonToken);
}

Expand Down Expand Up @@ -35302,7 +35302,7 @@ public override CSharpSyntaxNode VisitExternAliasDirective(ExternAliasDirectiveS
=> node.Update((SyntaxToken)Visit(node.ExternKeyword), (SyntaxToken)Visit(node.AliasKeyword), (SyntaxToken)Visit(node.Identifier), (SyntaxToken)Visit(node.SemicolonToken));

public override CSharpSyntaxNode VisitUsingDirective(UsingDirectiveSyntax node)
=> node.Update((SyntaxToken)Visit(node.GlobalKeyword), (SyntaxToken)Visit(node.UsingKeyword), (SyntaxToken)Visit(node.StaticKeyword), (SyntaxToken)Visit(node.UnsafeKeyword), (NameEqualsSyntax)Visit(node.Alias), (TypeSyntax)Visit(node.Type), (SyntaxToken)Visit(node.SemicolonToken));
=> node.Update((SyntaxToken)Visit(node.GlobalKeyword), (SyntaxToken)Visit(node.UsingKeyword), (SyntaxToken)Visit(node.StaticKeyword), (SyntaxToken)Visit(node.UnsafeKeyword), (NameEqualsSyntax)Visit(node.Alias), (TypeSyntax)Visit(node.NamespaceOrType), (SyntaxToken)Visit(node.SemicolonToken));

public override CSharpSyntaxNode VisitNamespaceDeclaration(NamespaceDeclarationSyntax node)
=> node.Update(VisitList(node.AttributeLists), VisitList(node.Modifiers), (SyntaxToken)Visit(node.NamespaceKeyword), (NameSyntax)Visit(node.Name), (SyntaxToken)Visit(node.OpenBraceToken), VisitList(node.Externs), VisitList(node.Usings), VisitList(node.Members), (SyntaxToken)Visit(node.CloseBraceToken), (SyntaxToken)Visit(node.SemicolonToken));
Expand Down Expand Up @@ -38724,7 +38724,7 @@ public ExternAliasDirectiveSyntax ExternAliasDirective(SyntaxToken externKeyword
return new ExternAliasDirectiveSyntax(SyntaxKind.ExternAliasDirective, externKeyword, aliasKeyword, identifier, semicolonToken, this.context);
}

public UsingDirectiveSyntax UsingDirective(SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax type, SyntaxToken semicolonToken)
public UsingDirectiveSyntax UsingDirective(SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax namespaceOrType, SyntaxToken semicolonToken)
{
#if DEBUG
if (globalKeyword != null)
Expand Down Expand Up @@ -38756,12 +38756,12 @@ public UsingDirectiveSyntax UsingDirective(SyntaxToken? globalKeyword, SyntaxTok
default: throw new ArgumentException(nameof(unsafeKeyword));
}
}
if (type == null) throw new ArgumentNullException(nameof(type));
if (namespaceOrType == null) throw new ArgumentNullException(nameof(namespaceOrType));
if (semicolonToken == null) throw new ArgumentNullException(nameof(semicolonToken));
if (semicolonToken.Kind != SyntaxKind.SemicolonToken) throw new ArgumentException(nameof(semicolonToken));
#endif

return new UsingDirectiveSyntax(SyntaxKind.UsingDirective, globalKeyword, usingKeyword, staticKeyword, unsafeKeyword, alias, type, semicolonToken, this.context);
return new UsingDirectiveSyntax(SyntaxKind.UsingDirective, globalKeyword, usingKeyword, staticKeyword, unsafeKeyword, alias, namespaceOrType, semicolonToken, this.context);
}

public NamespaceDeclarationSyntax NamespaceDeclaration(Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<SyntaxToken> modifiers, SyntaxToken namespaceKeyword, NameSyntax name, SyntaxToken openBraceToken, Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<ExternAliasDirectiveSyntax> externs, Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<UsingDirectiveSyntax> usings, Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken? semicolonToken)
Expand Down Expand Up @@ -43813,7 +43813,7 @@ public static ExternAliasDirectiveSyntax ExternAliasDirective(SyntaxToken extern
return new ExternAliasDirectiveSyntax(SyntaxKind.ExternAliasDirective, externKeyword, aliasKeyword, identifier, semicolonToken);
}

public static UsingDirectiveSyntax UsingDirective(SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax type, SyntaxToken semicolonToken)
public static UsingDirectiveSyntax UsingDirective(SyntaxToken? globalKeyword, SyntaxToken usingKeyword, SyntaxToken? staticKeyword, SyntaxToken? unsafeKeyword, NameEqualsSyntax? alias, TypeSyntax namespaceOrType, SyntaxToken semicolonToken)
{
#if DEBUG
if (globalKeyword != null)
Expand Down Expand Up @@ -43845,12 +43845,12 @@ public static UsingDirectiveSyntax UsingDirective(SyntaxToken? globalKeyword, Sy
default: throw new ArgumentException(nameof(unsafeKeyword));
}
}
if (type == null) throw new ArgumentNullException(nameof(type));
if (namespaceOrType == null) throw new ArgumentNullException(nameof(namespaceOrType));
if (semicolonToken == null) throw new ArgumentNullException(nameof(semicolonToken));
if (semicolonToken.Kind != SyntaxKind.SemicolonToken) throw new ArgumentException(nameof(semicolonToken));
#endif

return new UsingDirectiveSyntax(SyntaxKind.UsingDirective, globalKeyword, usingKeyword, staticKeyword, unsafeKeyword, alias, type, semicolonToken);
return new UsingDirectiveSyntax(SyntaxKind.UsingDirective, globalKeyword, usingKeyword, staticKeyword, unsafeKeyword, alias, namespaceOrType, semicolonToken);
}

public static NamespaceDeclarationSyntax NamespaceDeclaration(Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<SyntaxToken> modifiers, SyntaxToken namespaceKeyword, NameSyntax name, SyntaxToken openBraceToken, Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<ExternAliasDirectiveSyntax> externs, Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<UsingDirectiveSyntax> usings, Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken? semicolonToken)
Expand Down
Loading