You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Object creation new X(...) has no constructor occurrence, only a type occurrence #135
For an object creation expression the index has an occurrence of the type, but none of the constructor that the compiler binds. Constructor occurrences do exist elsewhere (for attributes, for example [MeansImplicitUse(...)] gets MeansImplicitUseAttribute#`.ctor`(+2).).
Observed: at new Made() and at new Made(1) only the occurrence Made# is written (on the type name), for the private and for the public, overloaded constructor alike. Expected: an occurrence of Made#`.ctor`(). and Made#`.ctor`(+1). respectively, so that uses of a constructor can be found.
Suggested fix
Write a constructor occurrence for object creation expressions (including target-typed new(...)).
Activity
linear-code commentedon Nov 16, 2026
OSS-24233