Skip to content

Defaulting a value to a type silently works in ref object #22996

@beef331

Description

@beef331

Description

Using a type as the default initializer works but should result in an error at declaration:

type MyObject = ref object _ = string

Nim Version

2.0.0

Current Output

No response

Expected Output

No response

Possible Solution

No response

Additional Information

No response

Metadata

Metadata

Assignees

Labels

Invalid Code AcceptanceEverything related to compiler not complaining about invalid code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions