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
wildcard utilities list
by
Zvoni
[
Today
at 01:50:56 pm]
LazNodeEditor (visual nod...
by
CynicRus
[
Today
at 01:33:11 pm]
Can /my/ AI help me with ...
by
microxa
[
Today
at 01:16:57 pm]
duplicate an Object at ru...
by
jamie
[
Today
at 12:54:49 pm]
Nothing but chaotic attem...
by
mdalacu
[
Today
at 12:45:46 pm]
How to wait until a WebDA...
by
marcov
[
Today
at 11:31:39 am]
Anubis activated
by
Handoko
[
Today
at 11:02:37 am]
Feature suggestion - repe...
by
Warfley
[
Today
at 09:50:41 am]
Flamerobin error-message
by
Zvoni
[
Today
at 09:11:06 am]
search via TSQLQuery
by
Zvoni
[
Today
at 08:55:43 am]
Can I enter MySQL prompt ...
by
Zvoni
[
Today
at 08:50:42 am]
TLazSerial : serial port ...
by
mas steindorff
[May 17, 2026, 10:50:34 pm]
StringGrid: which is "cur...
by
Bart
[May 17, 2026, 10:41:30 pm]
PopupMenu on dock menu
by
systemgvp
[May 17, 2026, 08:32:50 pm]
[SOLVED] Dark Theme
by
Hansvb
[May 17, 2026, 07:29:22 pm]
Bug with constref?
by
LemonParty
[May 17, 2026, 07:15:45 pm]
When will lazarus actuall...
by
marcov
[May 17, 2026, 05:52:04 pm]
FPC Unleashed (inline var...
by
Okoba
[May 17, 2026, 03:49:31 pm]
is this code correct?
by
Thaddy
[May 17, 2026, 03:23:29 pm]
Anubis's website security...
by
ALLIGATOR
[May 17, 2026, 02:45:52 pm]
Pure Pascal LZ4, LZ5 and ...
by
LemonParty
[May 17, 2026, 01:38:07 pm]
Linking a PortAudio stati...
by
Thaddy
[May 17, 2026, 10:52:31 am]
TShellTreeView TopItem
by
Paolo
[May 17, 2026, 10:07:58 am]
Temp file CGI00000.TMP
by
Thaddy
[May 17, 2026, 09:32:16 am]
Amigo programming languag...
by
paxscript
[May 17, 2026, 05:49:02 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this an issue? Generic method + {$M+} (Read 653 times)
ALLIGATOR
Sr. Member
Posts: 416
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: 6395
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