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:
parent
781743fa30
commit
9584c7e34f
|
|
@ -8,8 +8,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
||||||
{
|
{
|
||||||
internal sealed class EliminateMethodBodyPass : IntermediateNodePassBase, IRazorOptimizationPass
|
internal sealed class EliminateMethodBodyPass : IntermediateNodePassBase, IRazorOptimizationPass
|
||||||
{
|
{
|
||||||
// Run late in the optimization phase
|
// Run early in the optimization phase
|
||||||
public override int Order => int.MaxValue;
|
public override int Order => int.MinValue;
|
||||||
|
|
||||||
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
|
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -70,21 +70,6 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
|
||||||
Assert.Same(typeof(StringBuilder), property.PropertyType);
|
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]
|
[Fact]
|
||||||
public void DeclarationConfiguration_IncludesInherits()
|
public void DeclarationConfiguration_IncludesInherits()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue