This file contains hidden or 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
// Test case that perhaps shows a miscompile. | |
// | |
// % tinygo test -target=wasm | |
// panic: runtime error: nil pointer dereference | |
// | |
// To get a working compile: | |
// | |
// % tinygo test -opt=1 -target=wasm | |
// | |
// There are at least three trivial things one can do to this code to also get |
This file contains hidden or 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
FROM debian:latest | |
RUN apt-get update && apt-get install -y \ | |
bash \ | |
build-essential \ | |
default-jre \ | |
g++ \ | |
git \ | |
python \ | |
sudo \ | |
tar \ |
This file contains hidden or 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 <Foundation/Foundation.h> | |
NSString *indexSetToString(NSIndexSet *indexSet) | |
{ | |
NSMutableString *s = [[NSMutableString alloc] init]; | |
__block NSString *sep = @""; | |
[indexSet enumerateRangesUsingBlock: | |
^void (NSRange range, BOOL *stop) { | |
switch (range.length) { |