Skip to content

Commit

Permalink
Turn on strong mode for integrate directory
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronlademann-wf committed Oct 28, 2016
1 parent af8d5f9 commit 2914187
Show file tree
Hide file tree
Showing 8 changed files with 461 additions and 23 deletions.
2 changes: 0 additions & 2 deletions .analysis_options
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
analyzer:
strong-mode: true
exclude:
- integrate/**
linter:
rules:
- annotate_overrides
Expand Down
5 changes: 2 additions & 3 deletions integrate/lib/test_component_declaration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

library test_component_declaration;

import 'package:over_react/ui_core.dart';
import 'package:over_react/ui_components.dart';
import 'package:over_react/over_react.dart';

@Factory()
UiFactory<FooProps> Foo;
Expand All @@ -30,7 +29,7 @@ class FooState extends UiState {}
class FooComponent extends UiStatefulComponent<FooProps, FooState> {
@override
render() {
return Button()(
return Dom.div()(
'Child 1',
'Child 2'
);
Expand Down
11 changes: 9 additions & 2 deletions integrate/lib/test_react_element_typing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ import './test_component_declaration.dart';

/// Verify that treating the invocation of the builder as an unparameterized [ReactElement]
/// does not result in the following analyzer warning:
/// > Unsound implicit cast from ReactElement<dynamic> to ReactElement<Component>
void _reactElementTypingTest() {
///
/// Unsound implicit cast from ReactElement<dynamic> to ReactElement<Component>
ReactElement _reactElementTypingTest() {
ReactElement element = Foo()();

return element;
}

main() {
_reactElementTypingTest();
}
Loading

0 comments on commit 2914187

Please sign in to comment.