Enum variant values have to be constant expression integers. Division by 0 does not yield an integer so the compilation fails.
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
class Event {} | |
class CoolEvent extends Event {} | |
class EventHandler<T extends Event> {} | |
extension<T extends Event> on EventHandler<T> { | |
Type get eventType => T; | |
} | |
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
void func(List<int?> l) { | |
l.followedBy([]); | |
} | |
void main() { | |
List<int> l1 = [123]; | |
func(l1); | |
} |
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
import { inject, IStoresToProps } from 'mobx-react' | |
import { Component } from 'react' | |
import UserStore from './UserStore' // import your stores | |
import AuthStore from './AuthStore' // import your stores | |
export const user = new UserStore() | |
export const auth = new AuthStore() | |
export interface IStores { | |
user: UserStore, |
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
javascript: (() => { window.open(`http://img.youtube.com/vi/${ytplayer.config.args.video_id}/hqdefault.jpg`); })(); |
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
javascript: (() => {document.querySelector('#answers > div > div.brn-kodiak-answer.js-kodiak-answer.js-answer.brn-kodiak-answer--locked > div.brn-kodiak-answer__content > div.js-access-to-answers__with-access.js-first-question.js-hidden').classList.remove("js-hidden");document.querySelector('#answers > div > div.brn-kodiak-answer.js-kodiak-answer.js-answer.brn-kodiak-answer--locked > div.brn-kodiak-answer__unlock.js-scroll-to-unlock-section').remove();document.querySelector('#answers > div > div.brn-kodiak-answer.js-kodiak-answer.js-answer.brn-kodiak-answer--locked > div.brn-kodiak-answer__preview-end').remove();document.querySelector('#answers > div > div.brn-kodiak-answer.js-kodiak-answer.js-answer.brn-kodiak-answer--locked > div.brn-kodiak-answer__content > div.js-access-to-answers__preview-start.brn-kodiak-answer__content--cut').remove();})() |
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
const [path, fs] = ['path', 'fs'].map(require) | |
// config | |
const config = { | |
outputFile: { | |
name: 'files.json', | |
dir: './', | |
indent: 2 |