Skip to content

Commit

Permalink
Merge pull request #46025 from dotnet/merges/master-to-features/modul…
Browse files Browse the repository at this point in the history
…e-initializers

Merge master to features/module-initializers
  • Loading branch information
msftbot[bot] authored Jul 16, 2020
2 parents 9564bd7 + 8ae7921 commit 91eb6ee
Show file tree
Hide file tree
Showing 175 changed files with 3,191 additions and 1,565 deletions.
6 changes: 3 additions & 3 deletions eng/config/PublishData.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@
"vsBranch": "master",
"vsMajorVersion": 16
},
"features/dotnetFormat": {
"features/UsedAssemblyReferences": {
"nugetKind": [ "Shipping", "NonShipping" ],
"version": "3.3.*",
"version": "3.8.*",
"nuget": [ "https://dotnet.myget.org/F/roslyn/api/v2/package" ],
"vsix": [ "https://dotnet.myget.org/F/roslyn/vsix/upload" ],
"channels": [ "dotnetFormat" ],
"channels": [ "UsedAssemblyReferences" ],
"vsBranch": "master",
"vsMajorVersion": 16
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,8 @@ private bool IsCandidateSymbol(ISymbol memberSymbol)
}

private bool IsEntryPoint(IMethodSymbol methodSymbol)
=> (methodSymbol.Name == WellKnownMemberNames.EntryPointMethodName || methodSymbol.Name == "$Main") &&
=> (methodSymbol.Name == WellKnownMemberNames.EntryPointMethodName || methodSymbol.Name == "<Main>$") && // https://github.com/dotnet/roslyn/issues/45110 Switch to using WellKnownMemberNames.TopLevelStatementsEntryPointMethodName
// once src\CodeStyle\Core\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj is able to use the latest version of the type.
methodSymbol.IsStatic &&
(methodSymbol.ReturnsVoid ||
methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/Binder/Binder_QueryErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ internal void ReportQueryLookupFailed(
}
else if (ImplementsStandardQueryInterface(instanceArgument.Type, name, ref useSiteDiagnostics))
{
// Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?
// Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?
diagnostics.Add(new DiagnosticInfoWithSymbols(
ErrorCode.ERR_QueryNoProviderStandard,
new object[] { instanceArgument.Type, name },
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/CSharpResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3299,7 +3299,7 @@ A catch() block after a catch (System.Exception e) block can catch non-CLS excep
<value>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Consider explicitly specifying the type of the range variable '{2}'.</value>
</data>
<data name="ERR_QueryNoProviderStandard" xml:space="preserve">
<value>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</value>
<value>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</value>
</data>
<data name="ERR_QueryNoProvider" xml:space="preserve">
<value>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private static SingleNamespaceOrTypeDeclaration CreateSimpleProgram(GlobalStatem
{
return new SingleTypeDeclaration(
kind: DeclarationKind.SimpleProgram,
name: SimpleProgramNamedTypeSymbol.UnspeakableName,
name: WellKnownMemberNames.TopLevelStatementsEntryPointTypeName,
arity: 0,
modifiers: DeclarationModifiers.Internal | DeclarationModifiers.Partial | DeclarationModifiers.Static,
declFlags: (hasAwaitExpressions ? SingleTypeDeclaration.TypeDeclarationFlags.HasAwaitExpressions : SingleTypeDeclaration.TypeDeclarationFlags.None) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ namespace Microsoft.CodeAnalysis.CSharp.Symbols
/// </summary>
internal sealed class SimpleProgramNamedTypeSymbol : SourceMemberContainerTypeSymbol
{
internal const string UnspeakableName = "$Program";

internal SimpleProgramNamedTypeSymbol(NamespaceSymbol globalNamespace, MergedTypeDeclaration declaration, DiagnosticBag diagnostics)
: base(globalNamespace, declaration, diagnostics)
{
Debug.Assert(globalNamespace.IsGlobalNamespace);
Debug.Assert(declaration.Kind == DeclarationKind.SimpleProgram);
Debug.Assert(declaration.Name == UnspeakableName);
Debug.Assert(declaration.Name == WellKnownMemberNames.TopLevelStatementsEntryPointTypeName);

state.NotePartComplete(CompletionPart.EnumUnderlyingType); // No work to do for this.
}
Expand All @@ -42,7 +40,7 @@ internal SimpleProgramNamedTypeSymbol(NamespaceSymbol globalNamespace, MergedTyp

private static SimpleProgramNamedTypeSymbol? GetSimpleProgramNamedTypeSymbol(CSharpCompilation compilation)
{
return compilation.SourceModule.GlobalNamespace.GetTypeMembers(UnspeakableName).OfType<SimpleProgramNamedTypeSymbol>().SingleOrDefault();
return compilation.SourceModule.GlobalNamespace.GetTypeMembers(WellKnownMemberNames.TopLevelStatementsEntryPointTypeName).OfType<SimpleProgramNamedTypeSymbol>().SingleOrDefault();
}

internal static SynthesizedSimpleProgramEntryPointSymbol? GetSimpleProgramEntryPoint(CSharpCompilation compilation, CompilationUnitSyntax compilationUnit, bool fallbackToMainEntryPoint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ namespace Microsoft.CodeAnalysis.CSharp.Symbols
{
internal sealed class SynthesizedSimpleProgramEntryPointSymbol : SourceMemberMethodSymbol
{
internal const string UnspeakableName = "$Main";

/// <summary>
/// The corresponding <see cref="SingleTypeDeclaration"/>.
/// </summary>
Expand Down Expand Up @@ -73,7 +71,7 @@ public override string Name
{
get
{
return UnspeakableName;
return WellKnownMemberNames.TopLevelStatementsEntryPointMethodName;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ Blok catch() po bloku catch (System.Exception e) může zachytit výjimky, kter
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">Nenašla se implementace vzorku dotazu pro typ zdroje {0}. Nenašel se prvek {1}. Nechybí odkaz na System.Core.dll nebo na direktivu using pro System.Linq?</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">Nenašla se implementace vzorku dotazu pro typ zdroje {0}. Nenašel se prvek {1}. Nechybí odkaz na System.Core.dll nebo na direktivu using pro System.Linq?</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ Ein catch()-Block nach einem catch (System.Exception e)-Block kann nicht-CLS-Aus
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">Es konnte keine Implementierung des Abfragemusters für den Quelltyp "{0}" gefunden werden. "{1}" wurde nicht gefunden. Fehlt möglicherweise ein Verweis auf "System.Core.dll" oder eine Using-Direktive für "System.Linq"?</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">Es konnte keine Implementierung des Abfragemusters für den Quelltyp "{0}" gefunden werden. "{1}" wurde nicht gefunden. Fehlt möglicherweise ein Verweis auf "System.Core.dll" oder eine Using-Direktive für "System.Linq"?</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ Un bloque catch() después de un bloque catch (System.Exception e) puede abarcar
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">No se encontró ninguna implementación del patrón de consulta para el tipo de origen '{0}'. No se encontró '{1}'. ¿Falta alguna referencia a 'System.Core.dll' o alguna directiva using para 'System.Linq'?</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">No se encontró ninguna implementación del patrón de consulta para el tipo de origen '{0}'. No se encontró '{1}'. ¿Falta alguna referencia a 'System.Core.dll' o alguna directiva using para 'System.Linq'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ Un bloc catch() après un bloc catch (System.Exception e) peut intercepter des e
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">Impossible de trouver une implémentation du modèle de requête pour le type source '{0}'. '{1}' introuvable. Vous manque-t-il une référence à 'System.Core.dll' ou une directive using pour 'System.Linq' ?</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">Impossible de trouver une implémentation du modèle de requête pour le type source '{0}'. '{1}' introuvable. Vous manque-t-il une référence à 'System.Core.dll' ou une directive using pour 'System.Linq' ?</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ Un blocco catch() dopo un blocco catch (System.Exception e) può rilevare eccezi
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">Non è stata trovata un'implementazione del modello di query per il tipo di origine '{0}'. '{1}' non è presente. Probabilmente manca un riferimento a 'System.Core.dll' o una direttiva using per 'System.Linq'.</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">Non è stata trovata un'implementazione del modello di query per il tipo di origine '{0}'. '{1}' non è presente. Probabilmente manca un riferimento a 'System.Core.dll' o una direttiva using per 'System.Linq'.</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ AssemblyInfo.cs ファイルで RuntimeCompatibilityAttribute が false に設
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">ソース型 '{0}' のクエリ パターンの実装が見つかりませんでした。'{1}' が見つかりません。'System.Core.dll' の参照または 'System.Linq' のディレクティブの使用が指定されていることを確認してください。</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">ソース型 '{0}' のクエリ パターンの実装が見つかりませんでした。'{1}' が見つかりません。'System.Core.dll' の参照または 'System.Linq' のディレクティブの使用が指定されていることを確認してください。</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ catch (System.Exception e) 블록 뒤의 catch() 블록은 RuntimeCompatibilityA
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">소스 형식 '{0}'에 대해 구현된 쿼리 패턴을 찾을 수 없습니다. '{1}'을(를) 찾을 수 없습니다. 'System.Core.dll'에 대한 참조 또는 'System.Linq'에 대한 using 지시문이 있는지 확인하세요.</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">소스 형식 '{0}'에 대해 구현된 쿼리 패턴을 찾을 수 없습니다. '{1}'을(를) 찾을 수 없습니다. 'System.Core.dll'에 대한 참조 또는 'System.Linq'에 대한 using 지시문이 있는지 확인하세요.</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ Blok catch() po bloku catch (System.Exception e) może przechwytywać wyjątki n
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">Nie można znaleźć implementacji wzorca zapytania dla typu źródłowego „{0}”. Nie znaleziono elementu „{1}”. Być może brakuje odwołania do biblioteki „System.Core.dll” lub użycia dyrektywy dla przestrzeni nazw „System.Linq”.</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">Nie można znaleźć implementacji wzorca zapytania dla typu źródłowego „{0}”. Nie znaleziono elementu „{1}”. Być może brakuje odwołania do biblioteki „System.Core.dll” lub użycia dyrektywy dla przestrzeni nazw „System.Linq”.</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7261,8 +7261,8 @@ Um bloco catch() depois de um bloco catch (System.Exception e) poderá capturar
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">Não foi possível encontrar uma implementação do padrão de consulta para o tipo de origem "{0}". "{1}" não encontrado. Está faltando uma referência a "System.Core.dll" ou uma diretiva using para "System.Linq"?</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">Não foi possível encontrar uma implementação do padrão de consulta para o tipo de origem "{0}". "{1}" não encontrado. Está faltando uma referência a "System.Core.dll" ou uma diretiva using para "System.Linq"?</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ A catch() block after a catch (System.Exception e) block can catch non-CLS excep
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">Не удалось найти реализацию шаблона запроса для исходного типа "{0}". "{1}" не найден. Возможно, не хватает ссылки на "System.Core.dll" или директивы using для "System.Linq".</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">Не удалось найти реализацию шаблона запроса для исходного типа "{0}". "{1}" не найден. Возможно, не хватает ссылки на "System.Core.dll" или директивы using для "System.Linq".</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7263,8 +7263,8 @@ RuntimeCompatibilityAttribute AssemblyInfo.cs dosyasında false olarak ayarlanm
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProviderStandard">
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?</source>
<target state="translated">{0}' sorgu türü için sorgu deseninin bir uygulaması bulunamadı. '{1}' bulunamadı. Bir 'System.Core.dll' başvurusunu mu unuttunuz veya bir 'System.Linq' yönergesi mi kullanıyorsunuz?</target>
<source>Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found. Are you missing required assembly references or a using directive for 'System.Linq'?</source>
<target state="needs-review-translation">{0}' sorgu türü için sorgu deseninin bir uygulaması bulunamadı. '{1}' bulunamadı. Bir 'System.Core.dll' başvurusunu mu unuttunuz veya bir 'System.Linq' yönergesi mi kullanıyorsunuz?</target>
<note />
</trans-unit>
<trans-unit id="ERR_QueryNoProvider">
Expand Down
Loading

0 comments on commit 91eb6ee

Please sign in to comment.