Skip to content

Instantly share code, notes, and snippets.

View eernstg's full-sized avatar

Erik Ernst eernstg

  • Google
  • Aarhus, Denmark
View GitHub Profile
bool b = false;
void doWork(int i) => print("Do work ($i)");
void bailOut(int i) => print("Bail out ($i)");
void acquire() => print("Acquire the resource");
void release() => print("Release the resource");
// Consider: We want to simplify the following control flow.
@eernstg
eernstg / generic-function-instantiation.md
Last active April 5, 2018 06:50
Dart 2 feature specification of generic function instantiation

This document may be obsolete, or it may be a proposed new version; if in doubt please consider the version in the SDK repository (which may not yet exist).

Generic Function Instantiation

Author: eernst@.

Version: 0.3 (2018-04-05)

@eernstg
eernstg / dynamic-members.md
Last active September 4, 2018 14:26
Static analysis of members of dynamic

This document may be obsolete, or it may be a proposed new version; if in doubt please consider the version in the SDK repository (which may not yet exist).

Typing of members of dynamic

Author: eernst@.

Version: 0.2 (2018-09-04)

@eernstg
eernstg / interface-conflicts.md
Last active April 16, 2018 16:42
Dart 2 feature specification of interface conflict management

This document may be obsolete, or it may be a proposed new version; if in doubt please consider the version in the SDK repository (which may not yet exist).

Feature Specification: Interface Conflict Management

Owner: eernst@

Status: Under discussion.

@eernstg
eernstg / class-interfaces.md
Last active January 17, 2018 13:39
Feature specification of class interfaces in Dart

Flattened Interfaces

Author: eernst@.

Version: 0.1 (2018-01-10)

Status: Under discussion.

This document is a feature specification of the notion of a flattened interface in Dart that generalizes the concept of an

@eernstg
eernstg / implicit-creation.md
Last active April 10, 2018 14:32
Feature specification of implicit creation in Dart.

This document may be obsolete, or it may be a proposed new version; if in doubt please consider the version in the SDK repository.

Implicit Creation

Author: eernst@.

Version: 0.7 (2018-04-10)

@eernstg
eernstg / GenericConstructors.md
Last active November 24, 2017 15:52
Informal specification of generic constructors

Feature: Generic Constructors

Author: eernst@

Status: Under discussion.

Version: 0.1 (2017-11-24)

This document is an informal specification of the support in Dart 2 for generic constructors, that is, constructors that can receive their "own"

This document is now obsolete, please refer to the version in the SDK repository.

Informal Specification: Parameters that are Covariant due to Class Type Parameters

Owner: eernst@

Status: Implemented.

Version: 0.5 (2018-02-01)

@eernstg
eernstg / AboutSpecParser.md
Last active December 7, 2017 12:07
A few words on the specification parser

The Dart Specification Parser

Author: eernst@

Version: 0.1

We have created a Dart specification parser, built on a grammar specification Dart.g, which is transformed into a working parser by the tool ANTLR v3, using a couple of helper files (in particular, spec_parse.py and spec_parser). This document gives a short introduction to what it is, and some motivations for why we have it, along with an outline of the consequences for the testing workflow when we have a specification parser.

Motivation

@eernstg
eernstg / naiveTypeArguments.diff
Last active November 7, 2017 08:29
A patch for reflectable (branch use_build) adding a naive and probably still buggy ability to handle some actual type arguments
diff --git a/reflectable/lib/mirrors.dart b/reflectable/lib/mirrors.dart
index 8d3cd64..09ece0e 100644
--- a/reflectable/lib/mirrors.dart
+++ b/reflectable/lib/mirrors.dart
@@ -719,6 +719,17 @@ abstract class TypeMirror implements DeclarationMirror {
/// [TypeRelationsCapability].
List<TypeMirror> get typeArguments;
+ /// An immutable list with [Type] values for the actual type arguments
+ /// of this type.