Skip to content
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

java.lang.NullPointerException instead of scala.UnitializedFieldE… #1151

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

colin4124
Copy link
Contributor

Type of change: bug report

Impact: no functional change

Development Phase: implementation

Thanks @seldridge

class Foo { val x: Int = 1 }
class Bar { println(child.x); val child = new Foo }
new Bar

Run in a repl without and with the -Xcheckinit option on, it'll either be a java.lang.NullPointerException or a scala.UnitializedFieldError.

If using scala.UnitializedFieldError , Run mill chisel3.test will report error as below in ModuleSpec

- A desiredName parameterized by a submodule should work
[info] [0.000] Elaborating design...
- A name generating a null pointer exception should provide a good error message *** FAILED ***
  "Uninitialized field:  chisel3/src/test/scala/chiselTests/Module.scala: 75" did not include substring "desiredName of chiselTests.NullModuleWrapper is null" (Module.scala:159)

@colin4124 colin4124 requested a review from a team as a code owner August 12, 2019 15:42
@ghost
Copy link

ghost commented Aug 12, 2019

Can one of the admins verify this patch?

@seldridge
Copy link
Member

ok to test

Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

I don't think I have Jenkins powers, so this may require somebody else to get Jenkins CI moving.

@ucbjrl
Copy link
Contributor

ucbjrl commented Aug 12, 2019

ok to test

@seldridge seldridge merged commit 466ffbc into chipsalliance:master Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants