提交 ccd72589 编写于 作者: P Pharring

Fix typos (changeset 1221831)

上级 002c7ca4
......@@ -38,7 +38,7 @@ internal BlendedNode ReadNodeOrToken(LexerMode mode, bool asToken)
{
// This is the core driver of the blender. It just sits in a loop trying to keep our
// positions in the old and new text in sync. When they're out of sync it will try
// to match them back up, and it will apropriately determine which nodes or tokens
// to match them back up, and it will appropriately determine which nodes or tokens
// from the old tree can be reused as long as they don't overlap and changes or
// contain any errors.
......
......@@ -861,7 +861,7 @@ public void NewModifier_Indexer_ReturnsArray()
[Fact]
public void NewModifier_PartialIndexer()
{
// partial indexers are not allowed, but we should still parse it and report a sementic error
// partial indexers are not allowed, but we should still parse it and report a semantic error
// "Only methods, classes, structs, or interfaces may be partial"
var tree = UsingTree(@"
......
......@@ -1186,8 +1186,8 @@ public class D<T4>
"C`1+D`1.#M`2(!0,!1,!!0", // Missing close paren
"C`1+D`1.M`2(T0,T4,T2):", // Missing return type
"C`1+D`1.M`2(T0,T4,T2", // Missing close paren
"C`1+D`1+M`2(T0,T4,T2)", // '+' instead of '.' delimeter
"C`1.D`1.M`2(T0,T4,T2)", // '.' instead of '+' delimeter
"C`1+D`1+M`2(T0,T4,T2)", // '+' instead of '.' delimiter
"C`1.D`1.M`2(T0,T4,T2)", // '.' instead of '+' delimiter
"C`1+D`1.@namespace", // Escaped name
"C`1+D`1.#[blah]M`2(!0,!1,!!0)"); // Invalid calling convention
}
......@@ -1210,8 +1210,8 @@ End Class
"C`1+D`1.#M`2(!0,!1,!!0", // Missing close paren
"C`1+D`1.M`2(T0,T1,T2):", // Missing return type
"C`1+D`1.M`2(T0,T1,T2", // Missing close paren
"C`1+D`1+M`2(T0,T1,T2)", // '+' instead of '.' delimeter
"C`1.D`1.M`2(T0,T1,T2)", // '.' instead of '+' delimeter
"C`1+D`1+M`2(T0,T1,T2)", // '+' instead of '.' delimiter
"C`1.D`1.M`2(T0,T1,T2)", // '.' instead of '+' delimiter
"C`1+D`1.[Namespace]", // Escaped name
"C`1+D`1.#[blah]M`2(!0,!1,!!0)"); // Invalid calling convention
}
......
......@@ -126,7 +126,7 @@ public void Resolve(IList<ISymbol> results)
if (containingSymbol == null)
{
// If we cannot resolve the name on the left of the delimeter, we have no
// If we cannot resolve the name on the left of the delimiter, we have no
// hope of finding the symbol.
return;
}
......@@ -226,14 +226,14 @@ private string ParseNextNameSegment()
string segment;
// Find the end of the next name segment, special case constructors which start with '.'
int delimeterOffset = PeekNextChar() == '.' ?
int delimiterOffset = PeekNextChar() == '.' ?
this.name.IndexOfAny(nameDelimiters, this.index + 1) :
this.name.IndexOfAny(nameDelimiters, this.index);
if (delimeterOffset >= 0)
if (delimiterOffset >= 0)
{
segment = this.name.Substring(this.index, delimeterOffset - this.index);
this.index = delimeterOffset;
segment = this.name.Substring(this.index, delimiterOffset - this.index);
this.index = delimiterOffset;
}
else
{
......@@ -604,7 +604,7 @@ private void IgnorePointerAndArraySpecifiers()
if (containingSymbol == null)
{
// If we cannot resolve the name on the left of the delimeter, we have no
// If we cannot resolve the name on the left of the delimiter, we have no
// hope of finding the symbol.
return null;
}
......
......@@ -23,7 +23,7 @@ static PerformanceGoals()
// Captive >500 10,000 Long, show Progress Dialog w/Cancel
// Extended >500 >10,000 Long enough for the user to switch to something else
// Used for throughput scenaios like parser bytes per second.
// Used for throughput scenarios like parser bytes per second.
const string Throughput_100 = "Throughput_100";
Goals = new string[(int)FunctionId.Count];
......
......@@ -571,7 +571,7 @@ public virtual void Visit(ITypeMemberReference typeMemberReference)
{
if (typeMemberReference.AsDefinition(Context) == null)
{
this.Visit(typeMemberReference.GetAttributes(Context)); // In principle, refererences can have attributes that are distinct from the definitions they refer to.
this.Visit(typeMemberReference.GetAttributes(Context)); // In principle, references can have attributes that are distinct from the definitions they refer to.
}
}
......
......@@ -598,7 +598,7 @@ private IEnumerable<SyntaxTrivia> DescendantTriviaIntoTrivia(TextSpan span, Func
SyntaxTrivia trivia;
if (stack.TryGetNext(out trivia))
{
// PERF: Push before yield return so that "trivia" is 'dead' after the yield
// PERF: Push before yield returnsca so that "trivia" is 'dead' after the yield
// and therefore doesn't need to be stored in the iterator state machine. This
// saves a field.
if (trivia.HasStructure)
......
......@@ -1934,17 +1934,17 @@ lUnsplitAndFinish:
InitializeBlockStatement(level, i)
VisitFinallyBlock(node.FinallyBlockOpt, unsetInFinally)
For Each pend In tryAndCatchPending.PendingBranches
' Do not usnion if branch is a Yeild statement
Dim unionBranchWithFinallState As Boolean = pend.Branch.Kind <> BoundKind.YieldStatement
' Do not union if branch is a Yield statement
Dim unionBranchWithFinallyState As Boolean = pend.Branch.Kind <> BoundKind.YieldStatement
' or if the branch goes from Catch to Try block
If unionBranchWithFinallState Then
If unionBranchWithFinallyState Then
If BothBranchAndLabelArePrefixedByNesting(pend, ignoreLast:=True) Then
unionBranchWithFinallState = False
unionBranchWithFinallyState = False
End If
End If
If unionBranchWithFinallState Then
If unionBranchWithFinallyState Then
Me.UnionWith(pend.State, Me.State)
If Me.TrackUnassignments Then
Me.IntersectWith(pend.State, unsetInFinally)
......
......@@ -808,7 +808,7 @@ Lambda(
End Sub
<Fact()>
Public Sub ExpresionTrees_UDC_NullableAndConversion()
Public Sub ExpressionTrees_UDC_NullableAndConversion()
Dim file = <file name="expr.vb"><![CDATA[
Option Strict Off
Imports System
......@@ -5957,7 +5957,7 @@ End Module
End Sub
<Fact()>
Public Sub CheckedExpresionInCoalesceWitSideEffects()
Public Sub CheckedExpressionInCoalesceWitSideEffects()
Dim file = <file name="expr.vb"><![CDATA[
Option Strict Off
Imports System
......@@ -6778,7 +6778,7 @@ End Module
End Sub
<Fact()>
Public Sub ExpresionTrees_MyBaseMyClass()
Public Sub ExpressionTrees_MyBaseMyClass()
Dim file = <file name="expr.vb"><![CDATA[
Option Strict Off
Imports System
......
......@@ -1406,7 +1406,7 @@ Module Program
End Module
]]></file>
</compilation>)
' No sementic information is reported. It should be Int32.
' No semantic information is reported. It should be Int32.
Dim semanticSummary = CompilationUtils.GetSemanticInfoSummary(Of CollectionInitializerSyntax)(compilation, "a.vb")
Assert.Equal("?", semanticSummary.Type.ToTestDisplayString())
......
......@@ -24,7 +24,7 @@ End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="i", ReadInsideSymbol:="i, myarray", ReadOutsideSymbol:="",
WrittenInsideSymbol:="i", WrittenOutsideSymbol:="myarray",
......@@ -57,7 +57,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "String", "Integer", "Double", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "String", "Integer", "Double", "Integer")
GetDeclareSymbolTestForLoops(compilation1, Nothing)
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="i", ReadInsideSymbol:="i, myarray, s", ReadOutsideSymbol:="myarray",
WrittenInsideSymbol:="i", WrittenOutsideSymbol:="myarray, s",
......@@ -85,7 +85,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Double", "Integer", "Double", "Double", "Double")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Double", "Integer", "Double", "Double", "Double")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="i", ReadInsideSymbol:="i, s", ReadOutsideSymbol:="",
WrittenInsideSymbol:="i", WrittenOutsideSymbol:="s",
......@@ -117,7 +117,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Object", "Object", "Object", "Object", "Object", "Object")
SemanticInfoTypeTestForLoops(compilation1, 1, "Object", "Object", "Object", "Object", "Object", "Object")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="", ReadInsideSymbol:="ctrlVar, initValue, limit, stp", ReadOutsideSymbol:="",
WrittenInsideSymbol:="ctrlVar", WrittenOutsideSymbol:="initValue, limit, stp",
......@@ -149,7 +149,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
GetDeclareSymbolTestForLoops(compilation1, Nothing)
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="AVarName, B, C, D", ReadInsideSymbol:="", ReadOutsideSymbol:="",
WrittenInsideSymbol:="AVarName, B, C, D", WrittenOutsideSymbol:="",
......@@ -158,7 +158,7 @@ End Class
EndPointIsReachable:=True)
ClassfiConversionTestForLoops(compilation1)
SementicInfoTypeTestForLoops(compilation1, 2, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 2, "Integer", "Integer", "Integer", "Integer")
GetDeclareSymbolTestForLoops(compilation1, Nothing, 2)
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="B, C, D", ReadInsideSymbol:="", ReadOutsideSymbol:="",
WrittenInsideSymbol:="B, C, D", WrittenOutsideSymbol:="AVarName",
......@@ -167,7 +167,7 @@ End Class
EndPointIsReachable:=True, index:=2)
ClassfiConversionTestForLoops(compilation1, 2)
SementicInfoTypeTestForLoops(compilation1, 3, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 3, "Integer", "Integer", "Integer", "Integer")
GetDeclareSymbolTestForLoops(compilation1, Nothing, 3)
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="C, D", ReadInsideSymbol:="", ReadOutsideSymbol:="",
WrittenInsideSymbol:="C, D", WrittenOutsideSymbol:="AVarName, B",
......@@ -176,7 +176,7 @@ End Class
EndPointIsReachable:=True, index:=3)
ClassfiConversionTestForLoops(compilation1, 3)
SementicInfoTypeTestForLoops(compilation1, 4, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 4, "Integer", "Integer", "Integer", "Integer")
GetDeclareSymbolTestForLoops(compilation1, Nothing, 4)
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="D", ReadInsideSymbol:="", ReadOutsideSymbol:="",
WrittenInsideSymbol:="D", WrittenOutsideSymbol:="AVarName, B, C",
......@@ -206,7 +206,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="I, J", ReadInsideSymbol:="I", ReadOutsideSymbol:="",
WrittenInsideSymbol:="I, J", WrittenOutsideSymbol:="",
......@@ -215,7 +215,7 @@ End Class
EndPointIsReachable:=True)
ClassfiConversionTestForLoops(compilation1)
SementicInfoTypeTestForLoops(compilation1, 2, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 2, "Integer", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="J", ReadInsideSymbol:="I", ReadOutsideSymbol:="",
WrittenInsideSymbol:="I, J", WrittenOutsideSymbol:="I",
......@@ -244,7 +244,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="I, J", ReadInsideSymbol:="I, J", ReadOutsideSymbol:="",
WrittenInsideSymbol:="I, J", WrittenOutsideSymbol:="",
......@@ -253,7 +253,7 @@ End Class
EndPointIsReachable:=True)
ClassfiConversionTestForLoops(compilation1)
SementicInfoTypeTestForLoops(compilation1, 2, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 2, "Integer", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="J", ReadInsideSymbol:="I, J", ReadOutsideSymbol:="",
WrittenInsideSymbol:="J", WrittenOutsideSymbol:="I",
......@@ -283,7 +283,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="I, J", ReadInsideSymbol:="I", ReadOutsideSymbol:="",
WrittenInsideSymbol:="I, J", WrittenOutsideSymbol:="",
......@@ -292,7 +292,7 @@ End Class
EndPointIsReachable:=True)
ClassfiConversionTestForLoops(compilation1)
SementicInfoTypeTestForLoops(compilation1, 2, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 2, "Integer", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="J", ReadInsideSymbol:="", ReadOutsideSymbol:="I",
WrittenInsideSymbol:="J", WrittenOutsideSymbol:="I",
......@@ -321,7 +321,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Object", "Object", "Integer", "Object", "Integer", "Object")
SemanticInfoTypeTestForLoops(compilation1, 1, "Object", "Object", "Integer", "Object", "Integer", "Object")
GetDeclareSymbolTestForLoops(compilation1, Nothing)
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="J", ReadInsideSymbol:="J, x", ReadOutsideSymbol:="",
WrittenInsideSymbol:="J, x", WrittenOutsideSymbol:="x",
......@@ -351,7 +351,7 @@ Enum e1
End Enum
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "e1", "e1", "e1", "e1")
SemanticInfoTypeTestForLoops(compilation1, 1, "e1", "e1", "e1", "e1")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="x", ReadInsideSymbol:="", ReadOutsideSymbol:="",
WrittenInsideSymbol:="x", WrittenOutsideSymbol:="",
......@@ -385,7 +385,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Byte", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Byte", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="i", ReadInsideSymbol:="i, Me", ReadOutsideSymbol:="",
WrittenInsideSymbol:="i", WrittenOutsideSymbol:="Me",
......@@ -412,7 +412,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Long", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Long", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="global_x", ReadInsideSymbol:="", ReadOutsideSymbol:="",
WrittenInsideSymbol:="global_x", WrittenOutsideSymbol:="",
......@@ -435,7 +435,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="x", ReadInsideSymbol:="", ReadOutsideSymbol:="",
WrittenInsideSymbol:="x", WrittenOutsideSymbol:="",
......@@ -467,7 +467,7 @@ To _
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
GetDeclareSymbolTestForLoops(compilation1, Nothing)
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="x", ReadInsideSymbol:="", ReadOutsideSymbol:="",
WrittenInsideSymbol:="x", WrittenOutsideSymbol:="",
......@@ -493,7 +493,7 @@ Public Class MyClass1
End Class
</file>
</compilation>)
SementicInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
SemanticInfoTypeTestForLoops(compilation1, 1, "Integer", "Integer", "Integer", "Integer")
AnalyzeRegionDataFlowTestForLoops(compilation1, VariablesDeclaredSymbol:="", ReadInsideSymbol:="", ReadOutsideSymbol:="",
WrittenInsideSymbol:="Y", WrittenOutsideSymbol:="",
......@@ -546,7 +546,7 @@ End Module]]>,
End Sub
Private Function SementicInfoTypeTestForLoops(compilation As VisualBasicCompilation, index As Integer, ParamArray names As String()) As List(Of SemanticInfoSummary)
Private Function SemanticInfoTypeTestForLoops(compilation As VisualBasicCompilation, index As Integer, ParamArray names As String()) As List(Of SemanticInfoSummary)
Dim node = GetForStatement(compilation, index)
Dim model = GetModel(compilation)
Dim expressionFrom = node.FromValue
......
......@@ -397,7 +397,7 @@ End Module
'1
Dim semanticInfos = GetSemanticInfos(compilation1, 1)
SemanticInfoTypeTest(semanticInfos, "Boolean", "System.Func(Of Integer, Integer)", "Integer")
'SementicInfoConvetedTypeTest(semanticInfos, "Boolean", "Object", "Integer")
'SemanticInfoConvetedTypeTest(semanticInfos, "Boolean", "Object", "Integer")
Assert.Equal(ConversionKind.Identity, semanticInfos(0).ImplicitConversion.Kind)
Assert.Equal(ConversionKind.WideningReference Or ConversionKind.DelegateRelaxationLevelWideningToNonLambda, semanticInfos(1).ImplicitConversion.Kind)
Assert.Equal(ConversionKind.WideningValue, semanticInfos(2).ImplicitConversion.Kind)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册