sdk icon indicating copy to clipboard operation
sdk copied to clipboard

`strict-inference` should also trigger on enum constants

Open FMorschel opened this issue 3 weeks ago • 5 comments

I was expecting that with:

analyzer:
  language:
    strict-inference: true

Since for the following we get inference_failure_on_collection_literal:

void f() {
  var map = {};
}

We should also have a warning for being explicit on enum constants:

enum E<T> { a }

The above has no warnings.

Is this intended, or was this a missed case from when enhanced_enums showed up?

CC @lrhn @bwilkerson

FMorschel avatar Nov 19 '25 17:11 FMorschel