Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Is this an issue? Generic method + {$M+}
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Peculiarities in the EXE ...
by
Thaddy
[
Today
at 07:49:45 pm]
FPC Unleashed (async/awai...
by
Thaddy
[
Today
at 06:52:05 pm]
Windows 2026_7 update and...
by
Martin_fr
[
Today
at 06:23:32 pm]
KOL4 Beta available.
by
Thaddy
[
Today
at 06:23:08 pm]
Putting a new file on a w...
by
J-G
[
Today
at 04:43:36 pm]
Slow app start on M5 MacB...
by
Thaddy
[
Today
at 04:42:19 pm]
This week in OPM!
by
wp
[
Today
at 01:59:33 pm]
FastCGI vs. CGI
by
Thaddy
[
Today
at 01:32:45 pm]
Testing Antropic
by
Tomxe
[
Today
at 12:46:14 pm]
GTK3 is now the default w...
by
Thaddy
[
Today
at 10:22:34 am]
authentiacte through goog...
by
Thaddy
[
Today
at 09:12:56 am]
[SOLVED] Stopped compilin...
by
CM630
[
Today
at 08:41:58 am]
[CLOSED] Seeking performa...
by
Xenno
[
Today
at 08:11:26 am]
Lazarus Main not building...
by
Thaddy
[
Today
at 06:31:42 am]
Setting the CURSOR for th...
by
jamie
[
Today
at 02:16:55 am]
TPeriodicTable
by
wp
[
Today
at 12:19:25 am]
I have made some progress...
by
onionmixer
[July 17, 2026, 08:08:34 pm]
How to connect to MariaDb...
by
jcmontherock
[July 17, 2026, 06:23:38 pm]
Accessing VRAM memory wit...
by
LemonParty
[July 17, 2026, 04:45:30 pm]
docking IDE
by
Martin_fr
[July 17, 2026, 02:13:28 pm]
Engineering Software from...
by
jamie
[July 17, 2026, 12:51:57 pm]
[SOLVED] BitBtn Oddity
by
Petrus Vorster
[July 17, 2026, 09:05:55 am]
Difference between @ and ...
by
paule32
[July 17, 2026, 08:18:43 am]
Lazarus Bugfix Release 4....
by
papillon33
[July 17, 2026, 08:15:45 am]
Many recent books on Laza...
by
Khrys
[July 17, 2026, 06:35:48 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this an issue? Generic method + {$M+} (Read 664 times)
ALLIGATOR
Sr. Member
Posts: 456
I use FPC [main] 💪🐯💪
Is this an issue? Generic method + {$M+}
«
on:
September 15, 2025, 10:19:14 am »
Code: Pascal
[Select]
[+]
[-]
program
app
;
{$ifdef FPC}{$mode delphi}{$endif}
type
{$M+}
TC
=
class
published
procedure
test<T>
;
end
;
{$M-}
procedure
TC
.
test
<T>
;
begin
WriteLn
(
'kek!'
)
;
end
;
begin
end
.
Output:
Code:
[Select]
Error: Undefined symbol: P$APP$_$TC_$__$$_TEST$1 (first seen in app.o)
D12.1CE - OK (apparently, the D12.1CE compiler is generally poor at discarding unused methods (whether this is good or bad)
Logged
I may seem rude - please don't take it personally
Leledumbo
Hero Member
Posts: 8836
Programming + Glam Metal + Tae Kwon Do = Me
Re: Is this an issue? Generic method + {$M+}
«
Reply #1 on:
September 16, 2025, 08:36:08 pm »
I'd say yes, report it. At least that shouldn't be a link time error, maybe a compile time error.
Logged
Follow this if you want me to answer:
http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F
http://pascalgeek.blogspot.com
https://bitbucket.org/leledumbo
https://github.com/leledumbo
Code first, think later - Natural programmer B)
PascalDragon
Hero Member
Posts: 6403
Compiler Developer
Re: Is this an issue? Generic method + {$M+}
«
Reply #2 on:
September 16, 2025, 10:28:13 pm »
Please report.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Is this an issue? Generic method + {$M+}
TinyPortal
© 2005-2018