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

Omission/vagueness in spec chapter 8.3 #542

Closed
DartBot opened this issue Nov 21, 2011 · 4 comments
Closed

Omission/vagueness in spec chapter 8.3 #542

DartBot opened this issue Nov 21, 2011 · 4 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).

Comments

@DartBot
Copy link

DartBot commented Nov 21, 2011

This issue was originally filed by rodion...@unipro.ru


What steps will reproduce the problem?

  1. Run 08_3_Factories_and_Constructors_A03_t03.dart from the co19 suite
  2. Observe the error

Seems to be an omission in the spec (Ch. 8.3):
It specifically mentions the compile-time error when an interface and its factory class that IMPLEMENTS that interface do not have the same number of type parameters, but there's also a perfectly identical compile-time error in the case when the factory class does not implement the interface.

@DartBot
Copy link
Author

DartBot commented Nov 21, 2011

This comment was originally written by rodion...@unipro.ru


In case the test still isn't committed to co19 repo by the time you look at this issue, here it is:

/**
 * @­assertion Let I be an interface named NI with factory class F, and let NF be the
 * name of F. If F implements I then it is a compile-time error if I and F do not
 * have the same number of type parameters.
 * @­description Checks that there's no compile-time error if an interface
 * has fewer or more type parameters than its declared factory class as long as the
 * latter does not implement the former.
 */

class C<S, T> {
  factory I() {}
}

interface I<T> factory C<T, T> {
  I();
}

class C2<T> {
  factory I2() {}
}

interface I2<S, T> factory C2<S> {
  I2();
}

main() {
  new I();
  new I2();
}

@DartBot
Copy link
Author

DartBot commented Nov 22, 2011

This comment was originally written by drfibonacci@google.com


Added Area-Language, Triaged labels.

@gbracha
Copy link
Contributor

gbracha commented Dec 8, 2011

The spec will be revised next week to simplify factories. The examples will then be illegal, at which point I will close this bug.


Set owner to @gbracha.
Added Accepted label.

@gbracha
Copy link
Contributor

gbracha commented Dec 15, 2011

Added Done label.

@DartBot DartBot added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Dec 15, 2011
nex3 pushed a commit that referenced this issue Aug 31, 2016
This fixes the generated code to support these. Subtype checks are not fixed yet.

R=vsm@google.com

Review URL: https://codereview.chromium.org/2069903002 .
copybara-service bot pushed a commit that referenced this issue May 19, 2023
…, http_parser, leak_tracker, logging, markdown, matcher, mockito, shelf, source_map_stack_trace, tools

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

async (https://github.com/dart-lang/async/compare/d744058..96c29d0):
  96c29d0  2023-05-17  Goddchen  docs: fix typo in CancelableOperation.fromFuture(...) docs (#243)

csslib (https://github.com/dart-lang/csslib/compare/923edf0..b2b9b55):
  b2b9b55  2023-05-18  Devon Carew  address a regression in the compact output format (#183)
  1ff82fd  2023-05-15  Devon Carew  blast_repo fixes (#181)
  35bef7f  2023-05-11  Nate Bosch  Simplify TopLevelIncludes visitor (#180)
  c4e904c  2023-05-10  Devon Carew  rev for publishing (#179)
  c9e47d0  2023-05-10  Kevin Moore  Require Dart 2.19, latest lints, skin hanging test (#175)
  3976e6f  2023-05-10  Devon Carew  address an issue parsing font names (#168)
  a337a9a  2023-05-10  Devon Carew  fixed CssPrinter pretty print indent levels (#169)

fixnum (https://github.com/dart-lang/fixnum/compare/006a130..d9b9a2a):
  d9b9a2a  2023-05-17  Devon Carew  blast_repo fixes (#112)

glob (https://github.com/dart-lang/glob/compare/46403be..30f6aba):
  30f6aba  2023-05-17  Devon Carew  blast_repo fixes (#77)

html (https://github.com/dart-lang/html/compare/593d6f6..92eacab):
  92eacab  2023-05-17  Devon Carew  blast_repo fixes (#216)

http (https://github.com/dart-lang/http/compare/fb3b4be..d845560):
  d845560  2023-05-17  Devon Carew  blast_repo fixes (#933)

http_multi_server (https://github.com/dart-lang/http_multi_server/compare/d1fffed..a209cd5):
  a209cd5  2023-05-17  Devon Carew  blast_repo fixes (#55)

http_parser (https://github.com/dart-lang/http_parser/compare/5a33f5f..1ef3e56):
  1ef3e56  2023-05-17  Devon Carew  blast_repo fixes (#73)

leak_tracker (https://github.com/dart-lang/leak_tracker/compare/8ae200a..571c24a):
  571c24a  2023-05-18  Polina Cherkasova  Delete generate_diagrams.yaml (#67)
  f2029b6  2023-05-18  Devon Carew  blast_repo fixes (#66)
  474fd4f  2023-05-18  Polina Cherkasova  Separate testing. (#65)
  92a0b48  2023-05-17  Polina Cherkasova  Fixes to support G3. (#64)

logging (https://github.com/dart-lang/logging/compare/b75cba7..fa2486d):
  fa2486d  2023-05-18  Desislava Stefanova  Logger `onLevelChanged` notification (#138)

markdown (https://github.com/dart-lang/markdown/compare/6db8fc1..b951454):
  b951454  2023-05-18  Devon Carew  blast_repo fixes (#542)
  a714d95  2023-05-17  Zhiguang Chen  Fix delimiter row matching pattern for tables (#540)

matcher (https://github.com/dart-lang/matcher/compare/4dfd9ad..7e10117):
  7e10117  2023-05-18  Devon Carew  blast_repo fixes (#224)

mockito (https://github.com/dart-lang/mockito/compare/3fadd2d..28f174f):
  28f174f  2023-05-17  Ilya Yanok  Only check formatting with the stable SDK

shelf (https://github.com/dart-lang/shelf/compare/79e3cee..8793687):
  8793687  2023-05-18  dependabot[bot]  Bump actions/labeler from 4.0.2 to 4.0.3 (#353)
  2f1aefb  2023-05-18  Devon Carew  blast_repo fixes (#351)
  e1ca05d  2023-05-18  Devon Carew  Update no-response.yml (#349)

source_map_stack_trace (https://github.com/dart-lang/source_map_stack_trace/compare/09715f9..b83af01):
  b83af01  2023-05-18  Devon Carew  blast_repo fixes (#39)

tools (https://github.com/dart-lang/tools/compare/62c9604..49da4ca):
  49da4ca  2023-05-12  Polina Cherkasova  Add memory events. (#92)

Change-Id: I5cd1277e6df1d72f69569090d9a2381a2b81d5d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304460
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Projects
None yet
Development

No branches or pull requests

3 participants