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

dart_bin doesn't report line number on certain type-related errors #259

Closed
DartBot opened this issue Oct 28, 2011 · 3 comments
Closed

dart_bin doesn't report line number on certain type-related errors #259

DartBot opened this issue Oct 28, 2011 · 3 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@DartBot
Copy link

DartBot commented Oct 28, 2011

This issue was originally filed by [email protected]


An interface without a type parameter:
interface I {}

accidentally used with a type param:

class C<T> {
  I<T> f() => null;
}

main() {
  new C();
}

Gives an error in dart_bin but no file and line number:

krukow:~$ dart_bin ~/scratchpad/3.dart
wrong number of type arguments in type 'I'

vs dartc:

krukow:~$ dartc ~/scratchpad/3.dart
file:/Users/krukow/scratchpad/3.dart/3.dart:4: I: wrong number of type arguments
     3: class C<T> {
     4: I<T> f() => null;

Compilation failed with 1 problem.

@DartBot
Copy link
Author

DartBot commented Oct 31, 2011

This comment was originally written by [email protected]


Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

As far as I understand in non-checked mode the VM should ignore the wrong type. It would be nice to get a better error message when --enable-type-checks is passed to the VM. Regis, correct me if my assessment of this bug is wrong.


Set owner to @crelier.
Added Accepted label.

@crelier
Copy link
Contributor

crelier commented Feb 6, 2012

Fixed in r3965.

The fact that the error is also reported in non-checked mode is a different problem tracked by issue #441.


Added Fixed label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Feb 6, 2012
pq added a commit that referenced this issue Jun 27, 2016
* New `only_throw_errors` lint.
* New lint to check for `empty_statements` (#259).
* Fixed NSME when file contents cannot be read (#260).
* Fixed unsafe cast in `iterable_contains_unrelated_type` (#267).

[email protected]

Review URL: https://codereview.chromium.org/2103593003 .
copybara-service bot pushed a commit that referenced this issue Apr 10, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

tools (https://github.com/dart-lang/tools/compare/cd799be..58d9147):
  58d9147  2023-04-07  Christopher Fujino  [unified_analytics] Add NoOpAnalytics (#77)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/40eb236..b28bae6):
  b28bae6  2023-04-07  Rexios  Allow passing through custom http client in IO socket connect (#259)
  1064b47  2023-04-07  Nate Bosch  Fix deprecated_new_in_comment_reference (#262)

webdev (https://github.com/dart-lang/webdev/compare/22b34e3..7546291):
  75462913  2023-04-07  Elliott Brooks  Run mono_repo generate (#2081)
  9964ebab  2023-04-07  dependabot[bot]  Bump actions/labeler from 4.0.2 to 4.0.3 (#2067)
  3dee56b5  2023-04-07  Anna Gringauze  Remove eval error message on async frames (#2073)
  d6b3e9ce  2023-04-07  Elliott Brooks  Dart Code Metrics follow-up (#2072)
  48e3211a  2023-04-07  Elliott Brooks  Update the release script to take into account `pubspec_overrides.yaml` (#2080)
  fd75f511  2023-04-06  Elliott Brooks  Reset Webdev to 3.0.5-dev (#2077)

Change-Id: Iac863f7c4822fe6b9585e80e95d69467e8d60b6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294364
Reviewed-by: Nate Bosch <[email protected]>
Commit-Queue: Devon Carew <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
copybara-service bot pushed a commit that referenced this issue Nov 2, 2023
…lob, http_multi_server, http_parser, json_rpc_2, mockito, native, package_config, pool, sync_http, usage, webkit_inspection_protocol

Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (https://github.com/dart-lang/args/compare/df9b428..46d5033):
  46d5033  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#258)
  5f7c8b5  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#259)

bazel_worker (https://github.com/dart-lang/bazel_worker/compare/b1b6a66..3d9cd58):
  3d9cd58  2023-11-02  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#83)
  1d7bed3  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#84)

benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/59aea95..e59f675):
  e59f675  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#96)
  1899e39  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#95)

collection (https://github.com/dart-lang/collection/compare/d27bfaf..e8d7e92):
  e8d7e92  2023-11-02  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#318)
  1f5c234  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#319)

file (https://github.com/google/file.dart/compare/e7c03aa..cd3a932):
  cd3a932  2023-11-01  dependabot[bot]  Bump actions/checkout from 3.6.0 to 4.1.1 (#232)

glob (https://github.com/dart-lang/glob/compare/0046533..7c9a121):
  7c9a121  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#86)
  713142b  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#85)

http_multi_server (https://github.com/dart-lang/http_multi_server/compare/03041aa..2238a6b):
  2238a6b  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#60)

http_parser (https://github.com/dart-lang/http_parser/compare/c557f57..1cf5b7c):
  1cf5b7c  2023-11-02  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#80)
  cb6f142  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#81)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/0521afb..460545c):
  460545c  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#105)
  189b1a8  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#106)

mockito (https://github.com/dart-lang/mockito/compare/b7d752e..fcb9779):
  fcb9779  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#713)
  1c4a6ff  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#712)

native (https://github.com/dart-lang/native/compare/de9d59e..c72ed16):
  c72ed16  2023-11-01  Daco Harkes  [native_toolchain_c] Bump version to 0.3.2 (#184)
  4c9a50f  2023-11-01  Daco Harkes  [native_toolchain_c] Add workaround for minSdkVersion 19 and 20 (#181)
  45b5e6c  2023-11-01  Daco Harkes  [infra] Bump NDK version (#183)

package_config (https://github.com/dart-lang/package_config/compare/100533d..33dd246):
  33dd246  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#144)
  30c8f25  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#143)

pool (https://github.com/dart-lang/pool/compare/c78cef4..3c1bd42):
  3c1bd42  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#77)

sync_http (https://github.com/dart-lang/sync_http/compare/8233f74..d8e9f3d):
  d8e9f3d  2023-11-01  dependabot[bot]  Bump actions/checkout from 3.6.0 to 4.1.1 (#40)
  c59b6d4  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.0 to 1.6.0 (#41)

usage (https://github.com/dart-lang/usage/compare/d7d2964..e99690a):
  e99690a  2023-11-02  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#201)
  a540a6d  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#200)

webkit_inspection_protocol (https://github.com/google/webkit_inspection_protocol.dart/compare/2c6f8b6..667c55e):
  667c55e  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.0 to 1.6.0 (#113)

Change-Id: Ie6f2f0df0060cd77b9d56dc40172c134605417e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333680
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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