-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dart/transformer): Correctly handle const object annotations
Previously, annotations which were const objects (as opposed to const instance creation expressions) were incorrectly output as instance creation expressions. Before: ``` const override() // A const instance creation expression ``` After ``` override // A const instance ``` Closes #4481
- Loading branch information
Tim Blasi
committed
Oct 3, 2015
1 parent
01fb06a
commit decdbea
Showing
9 changed files
with
216 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...ransform/test/transform/bind_generator/queries_override_annotation_files/bar.ng_deps.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
library bar.ng_deps.dart; | ||
|
||
import 'bar.dart'; | ||
import 'package:angular2/src/core/metadata.dart'; | ||
|
||
var _visited = false; | ||
void initReflector(reflector) { | ||
if (_visited) return; | ||
_visited = true; | ||
reflector | ||
..registerType( | ||
ToolTip, | ||
new ReflectionInfo( | ||
const [const Directive(selector: '[tool-tip]')], | ||
const [], | ||
() => new ToolTip(), | ||
null, | ||
const { | ||
'queryField': const [override] | ||
})); | ||
} |
21 changes: 21 additions & 0 deletions
21
...test/transform/bind_generator/queries_override_annotation_files/expected/bar.ng_deps.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
library bar.ng_deps.dart; | ||
|
||
import 'bar.dart'; | ||
import 'package:angular2/src/core/metadata.dart'; | ||
|
||
var _visited = false; | ||
void initReflector(reflector) { | ||
if (_visited) return; | ||
_visited = true; | ||
reflector | ||
..registerType( | ||
ToolTip, | ||
new ReflectionInfo( | ||
const [const Directive(selector: '[tool-tip]')], | ||
const [], | ||
() => new ToolTip(), | ||
null, | ||
const { | ||
'queryField': const [override] | ||
})); | ||
} |
Oops, something went wrong.