Skip to content

Instantly share code, notes, and snippets.

@bbarker
Created December 12, 2021 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbarker/4d505822a988136aaf57ec99d829f15d to your computer and use it in GitHub Desktop.
Save bbarker/4d505822a988136aaf57ec99d829f15d to your computer and use it in GitHub Desktop.
Scala won't even let us try it (good!)
def exSetAllBeansTo(beanList: List[ScalaBean[?]], initBean: ScalaBean[?]): Unit =
beanList.foreach{bean =>
bean.setTheA(initBean.getTheA)
// ❌ Found: initBean.A
// Required: bean.A
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment