Skip to content

Неверно был указан тип преобразования для Даты.#1676

Open
dmpas wants to merge 1 commit intoEvilBeaver:developfrom
dmpas:feature/direct-date-cast-native
Open

Неверно был указан тип преобразования для Даты.#1676
dmpas wants to merge 1 commit intoEvilBeaver:developfrom
dmpas:feature/direct-date-cast-native

Conversation

@dmpas
Copy link
Copy Markdown
Collaborator

@dmpas dmpas commented May 9, 2026

Снимок экрана 2026-05-09 143235
#native
//Д = ТекущаяДата();
Д = Дата("20250101122214");
Сообщить(Д);
Сообщить(ТипЗнч(Д));

делает Д строкой

Summary by CodeRabbit

  • Bug Fixes
    • Fixed date conversion to properly use DateTime format instead of string conversion, ensuring accurate handling and processing of date values throughout the application.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 134ca570-96bc-407d-99bf-ed8c2cdfb9d6

📥 Commits

Reviewing files that changed from the base of the PR and between c455964 and 0ae2a9d.

📒 Files selected for processing (1)
  • src/OneScript.Native/Compiler/MethodCompiler.cs

📝 Walkthrough

Walkthrough

The MethodCompiler.CreateBuiltInFunctionCall method now converts Token.Date arguments to DateTime instead of string, aligning the type conversion with the semantic intent of date handling.

Changes

Date Token Conversion

Layer / File(s) Summary
Date Conversion Implementation
src/OneScript.Native/Compiler/MethodCompiler.cs
Token.Date conversion parameter changed from typeof(string) to typeof(DateTime) in the built-in function call handler.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A Date once dressed as a string, you see,
But now it hops in DateTime glee!
One line changed, the type set right,
From fuzzy to firm, a temporal delight!
Hop hop, the compiler now knows its place! 🕐

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: correcting the conversion type for Date from string to DateTime in the MethodCompiler.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant