diff --git a/src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs b/src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs index 38de364c4e9181755eb1eff61dca410e947f1ad4..b857a8edf19ec0d37a55ad2a60dc2d5294e144c2 100644 --- a/src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs +++ b/src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs @@ -1081,6 +1081,15 @@ internal class CodeAnalysisResources { } } + /// + /// Looks up a localized string similar to The provided operation must not be part of a Control Flow Graph.. + /// + internal static string OperationMustNotBeControlFlowGraphPart { + get { + return ResourceManager.GetString("OperationMustNotBeControlFlowGraphPart", resourceCulture); + } + } + /// /// Looks up a localized string similar to Output kind not supported.. /// diff --git a/src/Compilers/Core/Portable/CodeAnalysisResources.resx b/src/Compilers/Core/Portable/CodeAnalysisResources.resx index 7c13488606abf72a000dbd3ede1c0018604d9c65..5e495a4b1a869ddc6f17fce1cf835dc2a11d9649 100644 --- a/src/Compilers/Core/Portable/CodeAnalysisResources.resx +++ b/src/Compilers/Core/Portable/CodeAnalysisResources.resx @@ -630,4 +630,7 @@ Invalid branch kind. Finding a corresponding switch requires 'break' kind, but the current branch kind provided is '{0}'. + + The provided operation must not be part of a Control Flow Graph. + \ No newline at end of file diff --git a/src/Compilers/Core/Portable/Operations/OperationExtensions.cs b/src/Compilers/Core/Portable/Operations/OperationExtensions.cs index 53b397411c6cd5471a04cd2056ef1ebba467a929..2f0c613fc3c456814b5ecaa278cb62e742061520 100644 --- a/src/Compilers/Core/Portable/Operations/OperationExtensions.cs +++ b/src/Compilers/Core/Portable/Operations/OperationExtensions.cs @@ -330,7 +330,8 @@ internal static IOperation GetRootOperation(this IOperation operation) /// The corresponding loop operation or null in case not found (e.g. no loop syntax or the branch /// belongs to switch instead of loop operation) /// is null - /// Invalid branch kind. Applicable kinds: and . + /// The operation is a part of Control Flow Graph or it has an invalid branch kind. + /// Applicable kinds: and . public static ILoopOperation GetCorrespondingLoop(this IBranchOperation branchOperation) { if (branchOperation == null) @@ -338,6 +339,11 @@ public static ILoopOperation GetCorrespondingLoop(this IBranchOperation branchOp throw new ArgumentNullException(nameof(branchOperation)); } + if (branchOperation.SemanticModel == null) + { + throw new InvalidOperationException(CodeAnalysisResources.OperationMustNotBeControlFlowGraphPart); + } + if (branchOperation.BranchKind != BranchKind.Break && branchOperation.BranchKind != BranchKind.Continue) { throw new InvalidOperationException( @@ -355,7 +361,8 @@ public static ILoopOperation GetCorrespondingLoop(this IBranchOperation branchOp /// The corresponding switch operation or null in case not found (e.g. no switch syntax or the branch /// belongs to loop instead of switch operation) /// is null - /// Invalid branch kind. Applicable kinds: . + /// The operation is a part of Control Flow Graph or it has an invalid branch kind. + /// Applicable kinds: . public static ISwitchOperation GetCorrespondingSwitch(this IBranchOperation branchOperation) { if (branchOperation == null) @@ -363,6 +370,11 @@ public static ISwitchOperation GetCorrespondingSwitch(this IBranchOperation bran throw new ArgumentNullException(nameof(branchOperation)); } + if (branchOperation.SemanticModel == null) + { + throw new InvalidOperationException(CodeAnalysisResources.OperationMustNotBeControlFlowGraphPart); + } + if (branchOperation.BranchKind != BranchKind.Break) { throw new InvalidOperationException( diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.cs.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.cs.xlf index 3b897759a85707d00ea05a47cc6b1ce92dae703f..254528eed3aefc74b41b5bcbce395b5645005017 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.cs.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.cs.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. Druh výstupu se nepodporuje. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.de.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.de.xlf index 7123d8e1de8da4cce39deb308e23992caa476fcc..20b9d5ac3718ee44d2754b848d945aeb7e3e31c0 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.de.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.de.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. Ausgabetyp wird nicht unterstützt. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.es.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.es.xlf index 4adc5df846a97e457a821662088e574c914cf946..02d9ff133801815ad932a27b1da0b6e90eb2528a 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.es.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.es.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. Tipo de salida no admitida. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.fr.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.fr.xlf index fe315fa513430c034b828fbc0e50af2a48af6e5f..b6d0e516fae486b312631786abaef5b955a1e559 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.fr.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.fr.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. Type de sortie non pris en charge. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.it.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.it.xlf index 513dbfd17946fe86566e0a7a8e8fb6a5422bcfc0..f88235451a0b98e93f9db9cb5bb6d3b294edad8f 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.it.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.it.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. Il tipo di output non è supportato. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ja.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ja.xlf index 42449fc2303adac42d2b942fd974bee978cf78ee..69dc9156a4e82b5f924cf44266bfedc9fdcbf3e8 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ja.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ja.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. 出力の種類がサポートされていません。 diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ko.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ko.xlf index 79e94dc42a16544b85f6ad90702d2e0d3049ff36..293c3ea7ff96a2b9a83dcfb5633dd4a830f78d01 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ko.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ko.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. 출력 종류가 지원되지 않습니다. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pl.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pl.xlf index 98a290aac98b25dd2056041456c270c2af81e443..9c2806540a52e59dbc860ee7c76504f5b3f754a6 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pl.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pl.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. Rodzaj wyjścia nie jest obsługiwany. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pt-BR.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pt-BR.xlf index 4e9ec1eecb07c988a84dfaa0d88a072870bddcff..3f1e6d69cca7bcbe84687dc1f74c4728b8de16f4 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pt-BR.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.pt-BR.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. Tipo de saída sem suporte. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ru.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ru.xlf index db80716f2dfa938fcd2846d2fe211cd07dc25fb8..0797bab56d6e81fc4c0ec1a5dee0b8aafd56de02 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ru.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.ru.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. Неподдерживаемый тип выходных данных. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.tr.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.tr.xlf index e73bee7bb6b358b4a844e07c1c1f99d8f8e40f0e..8b1e56d9709742fc594e652d7f1adc8e80fabe46 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.tr.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.tr.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. Çıkış türü desteklenmiyor. diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hans.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hans.xlf index 31c1055ca2c5d400caf6bfa0c775f0353c5a89c6..2a342623b7b81b2c600ca3f2e04f38f2823088d8 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hans.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hans.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. 输出类型不受支持。 diff --git a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hant.xlf b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hant.xlf index 7dcc334f6129da851460f98200189faafb84b784..00c31f2e99c064a57ef63dc9bf2cab345e24911c 100644 --- a/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hant.xlf +++ b/src/Compilers/Core/Portable/xlf/CodeAnalysisResources.zh-Hant.xlf @@ -34,6 +34,11 @@ Given operation has a null semantic model. + + The provided operation must not be part of a Control Flow Graph. + The provided operation must not be part of a Control Flow Graph. + + Output kind not supported. 輸出種類不支援。