Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Conversation

@thosakwe
Copy link
Contributor

@thosakwe thosakwe commented Jun 15, 2017

Should take care of dart-lang/tools#925. 😄

.gitignore Outdated
pubspec.lock

# Avoid IntelliJ adding junk files to the repo
.idea
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, don't. These should be ignored in a user's global git ignore.

The number machine and IDE-specific files could grow forever...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my bad . Didn't realize.

@thosakwe
Copy link
Contributor Author

@kevmoo Fixed

@kevmoo
Copy link
Contributor

kevmoo commented Jun 15, 2017

@matanlurey should actually help w/ content – my ovly value is making sure .gitignore is pretty. 🧀

ExpressionBuilder isInstanceOf(TypeBuilder type) =>
new _IsInstanceOfExpression(this, type);

@override
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There already is a negate expression, no reason to add this.

/// Returns as an [ExpressionBuilder] indicating whether this expression is an instance of [type], using the `is` operator.
ExpressionBuilder isInstanceOf(TypeBuilder type);

/// Returns as an [ExpressionBuilder] indicating whether this expression is not an instance of [type], using the `is!` operator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto, remove.

}
}

class _IsNotInstanceOfExpression extends AbstractExpressionMixin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto remove.

expect(reference('foo').isInstanceOf(_barType), equalsSource('foo is Bar'));
});

test('should emit an `is!` expression', () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK to keep this test, just use negate instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, give me one minute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, got preoccupied. Fixed now!

@matanlurey matanlurey merged commit 4f32297 into dart-archive:master Jun 16, 2017
@thosakwe
Copy link
Contributor Author

Woohoo! 🎉

mosuem pushed a commit to dart-lang/tools that referenced this pull request Oct 25, 2024
* FieldBuilders now works to-level

* Ran dartfmt

* asThrow on ExpressionBuilder

* Removed asThrow

* Added isInstanceOf, isNotInstanceOf, and corresponding tests. Also added a .gitignore rule to exclude the `.idea` directory, for convenience's sake.

* Undo .gitignore change

* Undo .gitignore change, remove IntelliJ metadata

* Removed isNotInstanceOf
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants