I made a new complete project that worked.
As expected I guess.
However, the example is part of a test project for ArduinoHA.h where the problem showed up first time.
I will go back and start over to from scratch.
Just of curiosity; have you any idea how/why such a simple example can fail (without having the complete code)?
I think levin is on the right track. you should give new a type, not a constant of some type. I am a bit surprised this crashes. I‘d expect your examples to produce compiler errors.