Skip to content

Commit

Permalink
declare() WARN 5012 on compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Aug 5, 2024
1 parent 69acc20 commit 08a409f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Peachpie.CodeAnalysis/Semantics/SemanticsBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ BoundStatement BindStatementCore(AST.Statement stmt)
if (stmt is AST.StaticStmt staticStm) return BindStaticStmt(staticStm);
if (stmt is AST.UnsetStmt unsetStm) return BindUnsetStmt(unsetStm);
if (stmt is AST.PHPDocStmt) return new BoundEmptyStatement();
if (stmt is AST.DeclareStmt declareStm) return new BoundDeclareStatement();
if (stmt is AST.DeclareStmt declareStm)
{
Diagnostics.Add(GetLocation(stmt), Errors.ErrorCode.WRN_NotYetImplementedIgnored, $"declare()");
return new BoundDeclareStatement();
}

//
Diagnostics.Add(GetLocation(stmt), Errors.ErrorCode.ERR_NotYetImplemented, $"Statement of type '{stmt.GetType().Name}'");
Expand Down

0 comments on commit 08a409f

Please sign in to comment.