Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bad error message with invalid constructor call. #1847

Closed
floitschG opened this issue Feb 24, 2012 · 2 comments
Closed

Bad error message with invalid constructor call. #1847

floitschG opened this issue Feb 24, 2012 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@floitschG
Copy link
Contributor

When calling a constructor with the wrong arguments it points to the wrong line in the following example.

$ cat /tmp/bug.dart
class A {
  const A();
  A foo() => null;
}

main() => new A('foo');

$ out/Release_ia32/dart /tmp/bug.dart
'/tmp/bug.dart': Error: line 3 pos 3: invalid arguments passed to constructor 'A' for class 'A'
  A foo() => null;
  ^

@iposva-google
Copy link
Contributor

Added Accepted label.

@DartBot
Copy link

DartBot commented Feb 25, 2012

This comment was originally written by @mhausner


Fixed in r4584.


Added Fixed label.

@floitschG floitschG added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Feb 25, 2012
copybara-service bot pushed a commit that referenced this issue Jan 19, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/a99abd4..ed56883):
  ed56883d  2023-01-17  Parker Lougheed  Fix, cleanup, and simplify CSS (#3302)

http (https://github.com/dart-lang/http/compare/c955c7e..57c53b0):
  57c53b0  2023-01-17  Brian Quinlan  Fix a NPE that occurs when an error occurs before a response is received. (#852)

protobuf (https://github.com/dart-lang/protobuf/compare/dd04535..cc0f287):
  cc0f287  2023-01-18  Kevin Moore  Run non-null-safe tests with Dart 2 (#791)

test (https://github.com/dart-lang/test/compare/43fd928..19582a8):
  19582a8d  2023-01-19  Nate Bosch  Avoid empty `::group::` in Github reporter (#1855)
  fc4ea341  2023-01-19  Nate Bosch  Fix a test to use an still invalid URI (#1856)
  bd96213a  2023-01-18  Nate Bosch  Improve output for collections and long strings (#1852)
  9f7de8a2  2023-01-17  Nate Bosch  Remove operator extensions (#1847)
  f790feb0  2023-01-17  Nate Bosch  Add Condition abstraction (#1846)

webdriver (https://github.com/google/webdriver.dart/compare/b8c7bb5..00c887d):
  00c887d  2023-01-17  Devon Carew  rev to 3.0.2 in preparation for publishing (#268)

Change-Id: I2cbbcdce4fa510cd2458aa05dd45eed01e840c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279329
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This issue was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants