Skip to content

Add implicit contract constructor if no explicit one defined#350

Open
mbenke wants to merge 1 commit intomainfrom
default-constructor
Open

Add implicit contract constructor if no explicit one defined#350
mbenke wants to merge 1 commit intomainfrom
default-constructor

Conversation

@mbenke
Copy link
Copy Markdown
Collaborator

@mbenke mbenke commented Apr 9, 2026

In dispatch generation add a default empty constructor to the contract if it does not have one.
Should also remove many '!! Warning: no resolution found for start' encountered when running tests (most of which have no sonstructor, or no contract even).

@mbenke mbenke requested review from Y-Nak and d-xo April 9, 2026 09:06
Copy link
Copy Markdown
Member

@Y-Nak Y-Nak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
One thing I realized is that if a contract has a start function, then a compilation fails; Duplicated function definition:start.
This is not directly related to this PR, but we might need to consider how to lower the constract constructor.

@mbenke
Copy link
Copy Markdown
Collaborator Author

mbenke commented Apr 14, 2026

@Y-Nak thanks, good catch! This is a bigger change then it seemed at first glance though, so I'll do that in a separate PR.

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.

2 participants