mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-01 12:33:13 +01:00
[svn r124] Fixed another D vararg + return in ptr bug.
Fixed some nested function calls failed to resolve the context ptr.
This commit is contained in:
9
test/bug76.d
Normal file
9
test/bug76.d
Normal file
@@ -0,0 +1,9 @@
|
||||
module bug76;
|
||||
char[] fmt(...)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
void main()
|
||||
{
|
||||
char[] s = fmt();
|
||||
}
|
||||
17
test/bug77.d
Normal file
17
test/bug77.d
Normal file
@@ -0,0 +1,17 @@
|
||||
module bug77;
|
||||
import std.c.string;
|
||||
void main()
|
||||
{
|
||||
size_t len;
|
||||
void func2()
|
||||
{
|
||||
char* prefix = "";
|
||||
|
||||
void func()
|
||||
{
|
||||
len = strlen(prefix);
|
||||
assert(len == 0);
|
||||
}
|
||||
}
|
||||
func2();
|
||||
}
|
||||
15
test/strings2.d
Normal file
15
test/strings2.d
Normal file
@@ -0,0 +1,15 @@
|
||||
module strings2;
|
||||
|
||||
import std.string;
|
||||
import std.stdio;
|
||||
|
||||
void main()
|
||||
{
|
||||
int i = 32;
|
||||
auto str = format(i);
|
||||
writefln(str);
|
||||
|
||||
long l = 123123;
|
||||
str = format(l);
|
||||
writefln(str);
|
||||
}
|
||||
Reference in New Issue
Block a user