Exemple #1
0
 public void TypeAliasInsideCodeBlockIsNotHandledSpecially()
 {
     ParseBlockTest("{ using Foo = Bar.Baz; var foo = bar; }",
                    new StatementBlock(
                        Factory.MetaCode("{").Accepts(AcceptedCharactersInternal.None),
                        Factory.Code(" using Foo = Bar.Baz; var foo = bar; ")
                        .AsStatement()
                        .AutoCompleteWith(autoCompleteString: null),
                        Factory.MetaCode("}").Accepts(AcceptedCharactersInternal.None)
                        ),
                    RazorDiagnosticFactory.CreateParsing_NamespaceImportAndTypeAliasCannotExistWithinCodeBlock(
                        new SourceSpan(new SourceLocation(2, 0, 2), contentLength: 5)));
 }