Revert "Fix a bug with ref and declaration phase"

This reverts commit dotnet/aspnetcore-tooling@09b50151ef.

# Conflicts:
#	src/Razor/test/RazorLanguage.Test/IntegrationTests/ComponentDeclarationIntegrationTest.cs
\n\nCommit migrated from c0e934ed7c
This commit is contained in:
N. Taylor Mullen 2019-08-14 12:49:01 -07:00
parent 781743fa30
commit 9584c7e34f
2 changed files with 2 additions and 17 deletions

View File

@ -8,8 +8,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal sealed class EliminateMethodBodyPass : IntermediateNodePassBase, IRazorOptimizationPass
{
// Run late in the optimization phase
public override int Order => int.MaxValue;
// Run early in the optimization phase
public override int Order => int.MinValue;
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
{

View File

@ -70,21 +70,6 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
Assert.Same(typeof(StringBuilder), property.PropertyType);
}
[Fact]
public void DeclarationConfiguration_IncludesRef()
{
// Arrange & Act
var component = CompileToComponent(@"
@using System.Text
<div @ref=""myDiv"" />
");
// Assert
var field = component.GetType().GetField("myDiv", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.NotNull(field);
Assert.Same(typeof(ElementReference), field.FieldType);
}
[Fact]
public void DeclarationConfiguration_IncludesInherits()
{