New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disallow new MyObj.type
#9457
Disallow new MyObj.type
#9457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@@ -4763,7 +4763,7 @@ trait Types | |||
/** def isNonValueType(tp: Type) = !isValueElseNonValue(tp) */ | |||
|
|||
def isNonRefinementClassType(tpe: Type) = tpe match { | |||
case SingleType(_, sym) => sym.isModuleOrModuleClass | |||
case SingleType(_, sym) => sym.isModuleClass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record: this reverts the change here that came from #9279, by moving it locally to typedClassOf
.
new
, but do allow them for classOf
new
, but do allow them for classOf
classOf[Foo.type]
This is just a bug fix. #9279 was the improvement which we shipped and release noted in 2.13.4. |
"Just" in the "no need to release note it" sense 🙇🏼 thank you for the fix!! |
💔 |
... while still allowing
classOf[MyObj.type]
.Fixes scala/bug#12322