moonbit-docs icon indicating copy to clipboard operation
moonbit-docs copied to clipboard

compiler should report warning when user define type name the same as `intrinsic types` like Int, Double

Open illusory0x0 opened this issue 6 months ago • 0 comments

In MoonBit, Int/Double etc. are compiler builtin types, so there is no need to export them: they are universally available, unqualified.

Defining custom type with the same name as builtin types can cause a lot of confusion for code reader. So we may disable this in the future.

https://github.com/moonbitlang/core/issues/1899#issuecomment-2789055909

Related Issues #1899

illusory0x0 avatar Apr 22 '25 12:04 illusory0x0