[Chapel Merge] Improve error message for unrecognized 'this' type

Branch: refs/heads/main
Revision: 3e74f2e
Author: bradcray
Link: Improve error message for unrecognized 'this' types on initializers by bradcray · Pull Request #19595 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19595 from bradcray/fix-19280

Improve error message for unrecognized 'this' types on initializers

[reviewed by @e-kayrakli]

This changes an internal error into a user-facing one and improves its
wording somewhat for when initializers are defined on unrecognized
types.

Resolves #19280.

Modified Files:
A test/classes/initializers/errors/badThisType.chpl

A test/classes/initializers/errors/badThisType.good
M compiler/passes/normalize.cpp

Compare: https://github.com/chapel-lang/chapel/compare/bb370084e2e6...3e74f2e8ad34