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

double definition error due to specialized constructor argument with default value #7329

Closed
scabug opened this issue Apr 4, 2013 · 2 comments
Closed

Comments

@scabug
Copy link

@scabug scabug commented Apr 4, 2013

compiling

class TwoParamSpecializedWithDefault[@specialized A, @specialized B](a: A, b: B = (??? : B))

yields

error: double definition:
method <init>$default$2$mVc$sp:()Unit and
method <init>$default$2$mVc$sp:()Unit at line 1
have same type
@scabug
Copy link
Author

@scabug scabug commented Apr 4, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7329?orig=1
Reporter: @adriaanm
Affected Versions: 2.10.1

@scabug
Copy link
Author

@scabug scabug commented Apr 5, 2013

@vigdorchik said:
Looking at this example makes me wonder if it ever makes sense to have default getter for a constructor parameter specialized. The fact that default getter is run before the instance is created strengthens this thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants